larsrosen
Hi,
i installed an openvpn server on debian.
My goal is to set up a site2site network. that works too.
I only have to create the static routes on the server by hand.
How can I tell the server with OVPN that it will automatically set a route to the client network via the VPN interface?
jstaubr
I use up script in the configuration of the server.
script-security 2
up "/etc/openvpn/ip-new.up"
#!/bin/bash
INTERFACE=$1; shift;
TUN_MTU=$1; shift;
UDP_MTU=$1; shift;
LOCAL_IP=$1; shift;
REMOTE_IP=$1; shift;
MODUS=$1; shift;
ip a a 10.0.224.1/20 dev tun0
exit 0
This adds correct IP and route to the tun interface. You can also add other ip/routes as you need.