Search This Blog

Wednesday, September 26, 2012

OpenVPN can connect, but no LAN Acess

I setup an openvpn, but no LAN access when I connected to VPN

Here is the steps to fix it:
1, logon to openvpn server and check this file
[root@openvpn ~]# cat /proc/sys/net/ipv4/ip_forward

2, if it returns 0, that's the root cause. But you cannot modify this file directly.

3, You need change ip_forward to 1 permanent
open file and change net.ipv4.ip_forward to 1 , about line 7:
[root@openvpn ~]# vim /etc/sysctl.conf
# Controls IP packet forwarding
net.ipv4.ip_forward = 1

 4, Reboot the server or you can do this to avoid rebooting
[root@openvpn ~]# sysctl -p

[root@openvpn ~]# sysctl -w net.ipv4.route.flush=1

5, reconnect to you VPN

No comments:

Post a Comment