Posted: Wed Sep 21, 2016 0:46 Post subject: Openvpn help
Hi All,
I have two asus ac56u routers that im trying to connect via openvpn. The tunnel is up, but I cant get any traffic across it and cannot ping the tun0 interface (or any other device) on the other network. I enabled pinging from anonymous wan addresses under the firewall tab. I want all traffic from the client to route through the server
router1 (server) network - 192.168.1.0/24
# Move to writable directory and create scripts
cd /tmp
ln -s /usr/sbin/openvpn /tmp/myvpn
# Config for Site-to-Site SiteA-SiteB
echo "
proto udp
port 1194
dev tun0
secret /tmp/static.key
verb 3
comp-lzo
persist-tun
keepalive 15 60
daemon
" > SiteA-SiteB.conf
# Config for Static Key
echo "
-----BEGIN OpenVPN Static key V1-----
KEY
-----END OpenVPN Static key V1-----
" > static.key
# Create interfaces
/tmp/myvpn --mktun --dev tun0
ifconfig tun0 10.0.0.1 netmask 255.255.255.0 promisc up
# Create routes
route add -net 192.168.2.0 netmask 255.255.255.0 gw 10.0.0.2
# Initiate the tunnel
sleep 5
/tmp/myvpn --config SiteA-SiteB.conf
Posted: Wed Sep 21, 2016 3:13 Post subject: UPDATE
Update :
I added the line :
push "route 192.168.1.0 255.255.255.0"
to my server config and when both devices are connected to my home router (internal test) everything seems to work flawlessly -- in my log on the client router I can see that eth0 eth1 eth2 and br0 entered a forwarding state and when I do a tracert in windows I can indeed see that traffic is being forwarded through the vpn server, im also able to ping both the other endpoint on both IP's and my modem.
the only issue now is that it doesnt work when the client is on an external connection .
i dont see the route in the routing table and I dont get the entered forwarding state in the log