This is my home network configuration:
Devices/Pc/Smartphone ---> DD-WRT Router ---> Internet Router ---> Internet/World
DD WRT router ip: 192.168.1.1 (default gw is 192.168.1.254)
Internet Router ip: 192.168.1.254
Devices ip going from 192.168.1.2 to 192.168.1.253
I would like to configure the DD WRT flashed router with a PPTP VPN client running. The PPTP VPN virtual device is called ppp0.
- All ip ranging from 192.168.1.40 to 192.168.1.50 pass through Vpn (so, pass through ppp0 inteface and ppp0 gateway)
- All others ip uses default lan gateway (so, not uses vpn)
When i start VPN client on DD WRT, my route table is
0.0.0.0 via 192.168.1.254 dev eth0 default via 192.168.120.10 dev ppp0 scope link 220.127.116.11 via 192.168.1.254 dev eth0 18.104.22.168 via 192.168.1.254 dev eth0 127.0.0.0/8 dev lo scope link 169.254.0.0/16 dev br0 proto kernel scope link src 169.254.255.1 192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.132 192.168.1.254 via 192.168.1.254 dev eth0 192.168.120.10 dev ppp0 scope link
Now, i think i've to replace
- default via 192.168.120.10 dev ppp0
- default via 192.168.1.254 dev eth0
so ALL ip go through standard internet gateway (no PPTP vpn)... then add a rule like
- 192.168.1.40 via 192.168.120.10 dev ppp0
to allow ONLY ip 192.168.1.40 to exit using PPTP.
But..it isn't working!
So my final question is:
- How to configure my router route all IP through default internet gateway (192.168.1.254) AND only One Ip (or a range of ip) to exit using pptp vpn connection ?
Thanks a lot!