I'm trying to pass the openvpn traffic trough a UDP tunnel by these configs :
Note: tunnel is already established on port 23460 server and 52320 client machine;
Both server and client have static valid IP address.
Server Side:
Code: Select all
proto udp
dev tap
remote SERVER_IP 23460
ifconfig 10.0.8.2 255.255.255.0
port 52320
verb 3
persist-key
persist-tun
secret static.key
status /var/log/openvpn-status.log
log-append /var/log/openvpn
Code: Select all
proto udp
dev tap
remote CLIENT_IP 52320
ifconfig 10.0.8.1 255.255.255.0
port 23460
verb 3
persist-key
persist-tun
secret static.key
status /var/log/openvpn-status.log
log-append /var/log/openvpn
and then run openvpn like this:
Server:
Code: Select all
openvpn --cd $dir --daemon --config dynamic.conf
Code: Select all
route add -host SERVER_IP gw CLIENT_IP
route add -host 4.2.2.3 gw CLIENT_IP
openvpn --cd $dir --daemon --config dynamic.conf
route del default
route add default gw 10.0.8.2
I cant ping neither server tap device ip (10.0.8.2) nor any other ip/domain from client
Can anyone help me with this? what can be the problem?