My LAN configuration is as follows:
- main router Zyxel 192.168.1.1 acting as gateway (vdsl connection) and access point
- openwrt router TD-W8970 192.168.1.2 acting as access point and vpn server (10.212.79.1)
What I want to do is to create a VPN network with clients that must send internet requests only through my LAN gateway; in other words, I want that the clients public IP shown on internet is the one of my LAN gateway and not the one assigned to them by their ISP.
Here below my configuration:
server 10.212.79.0 255.255.255.0
keepalive 10 60
push "dhcp-option DNS 220.127.116.11"
push "dhcp-option DNS 18.104.22.168"
push "route 192.168.1.0 255.255.255.0"
tls-auth /etc/easy-rsa/pki/ta.key 0
remote myserver_xyz.com 1194 udp
tls-auth ta.key 1
The openvpn network is established correctly and the client is able to ping vpn server 10.212.79.1 and navigate in Internet.
The problem is that the IP shown on Internet is the one assigned to client by its ISP and not the one of the LAN where the vpn server is located.
I tried to perform some changes in server configuration but with no success.
I also tried to put push "redirect-gateway def1" or push "redirect-gateway autolocal" but in this cases the client stopped to go to internet at all.
Can you please help me?
Thanks in advance