I'm trying to do a setup where clients are assigned static addresses and any connections they make to the LAN on the openvpn server's network come from their (virtual)source address rather then the server's address, I also want internet traffic able to be routed through the vpn with the same rules so I can detect specific client addresses on the router/firewall side.
Client 172.19.197.6
Server 172.19.195.18
When I connect to FTP @ 172.19.195.13 the source address is coming back as 172.19.195.18 rather than 172.19.197.6 (which is what I would like).
I've added a static route for 172.19.197.0/24 into my router to have 172.19.195.18 as the next hop as well.
I'm unable to ping 172.19.197.6 from other machines on the network though.
Any help/advice or direction in the matter would be greatly appreciated.
server.conf
dev tun
proto tcp-server
port 1095
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
tls-auth /etc/openvpn/ta.key 0
client-cert-not-required
username-as-common-name
server 172.19.197.0 255.255.255.0
client-to-client
client-config-dir /etc/openvpn/ccd/
route 172.19.197.0 255.255.255.0
push "route 172.19.197.0 255.255.255.0"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "redirect-gateway def1"
log-append /var/log/openvpn/server.log
tmp-dir /tmp
# use otp passwords
plugin /usr/local/lib/openvpn/openvpn-otp.so
client.conf
remote XXXXX 1095
ca [inline]
tls-auth [inline] 1
client
dev tun
tls-client
proto tcp-client
route-method exe
route-delay 2
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
auth-nocache
reneg-sec 0
verb 3
ccd/DEFAULT
iroute 172.19.197.0 255.255.255.0