I am trying to configure my OpenWrt router to allow me to share my VPN connection between several devices.
When my router is not connected to VPN, the computer has internet access. When the router connects to VPN (I can verify that by running traceroute on router), the computer doesn't have internet access.
I think it has something to do with routing, but I have no idea where to start.
First I installed package
Then I added interface
config interface 'vpn' option 'ifname' 'pptp-vpn' option proto 'pptp' option server 'XXX' option username 'YYY' option password 'ZZZ' option buffering '1'
then vpn connects, I can verify that
vpn interface shows up in
ifconfig -a, and I can see in traceroute that traffic does indeed go through the VPN. But I cannot connect anywhere from the computer, yet.
Then the tutorial tells me to add VPN interface to WAN firewall zone (I don't know what is the effect of this, maybe that is the culprit).
Then I install package
ip, and changed file
/etc/iproute2/rt_tables to add a new table named 'vpn'
# reserved values # 255 local 254 main 253 default 10 vpn 0 unspec
Then I added ip rules
ip rule add from<pc_ip> table vpn ip route add default via <tunnel_ip> dev pptp-vpn table vpn
<pc_ip> is the IP address of my computer and
<tunnel_ip> the current IP address I was assigned by the VPN connection.
Now the tutorial says that the connection on my computer should work, but I cannot ping anything, open anything from browser, nothing.
What can I do to solve this problem?