[Solved] Asus rt-ac5 accessing the LAN of the openvpn server

Samples of working configurations.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Locked
cobrax2
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 14, 2016 7:47 am

[Solved] Asus rt-ac5 accessing the LAN of the openvpn server

Post by cobrax2 » Thu Jan 14, 2016 8:02 am

Hi guys
I have an Asus rt-ac56u router that is the gateway to the internet. it also has a lan behind it, 192.168.10.0
Started a openvpn server to be able to connect a few phones securely through this router. it works fine, except the fact that the phones can't access the lan (.10.0). they can ping the lan gw .10.1, but they can't go further. tried everything i could think of, tried help on the firmware's forum. nothing, eventually they redirected me here :)
i've tried even different firmwares, merlin (which is based on asus), tomato shibby, tomato toastman. now i am on tomato toastman.
ok, here are the configs now:

Code: Select all

# Automatically generated configuration
daemon
server 192.168.25.0 255.255.255.0
proto udp
port 5000
dev tun21
comp-lzo adaptive
keepalive 15 60
verb 3
push "route 192.168.10.0 255.255.255.0"
client-config-dir ccd
client-to-client
push "dhcp-option DNS 192.168.10.1"
push "redirect-gateway def1"
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status

Code: Select all

client
dev tun
proto udp
remote my.ip 5000
float
comp-lzo adaptive
keepalive 15 60
ns-cert-type server
resolv-retry infinite
nobind
thank you!

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Trouble accessing the LAN of the openvpn server

Post by Traffic » Thu Jan 14, 2016 12:20 pm

To access the Server LAN please see this HOWTO:
HOWTO: Routing all client traffic (including web-traffic) through the VPN

Note: iptables requirement.

cobrax2
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 14, 2016 7:47 am

Re: Trouble accessing the LAN of the openvpn server

Post by cobrax2 » Thu Jan 14, 2016 12:50 pm

omg it was this simple
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
thank you very much!

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Trouble accessing the LAN of the openvpn server

Post by Traffic » Thu Jan 14, 2016 1:06 pm

You are welcome.

Some times it is "just that simple" .. sometimes it is not :shock:

Thanks for letting us know your solution 8-)

Locked