0

I have searched the whole web for this but it seems no one has had similar problem. I have a local network (no internet) which my router ip is 10.201.32.10 and my gateway is 10.201.32.41 I have a VPS with IP 185.10.10.10 which the network allows me to connect to and It has internet access. Currently I'm using openvpn on all my clients to connect to internet through this VPS(The VPS is openvpn server) Now I want to see if I can setup a router on my VPS to make it my default router and don't use any VPN client. here is my local routes:

10.201.32.41    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
10.11.12.0      0.0.0.0         255.255.255.0   U     0      0        0 br0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
0.0.0.0         10.201.32.41    0.0.0.0         UG    0      0        0 ppp0

Now I add a static route to my VPS using:

route add 185.10.10.10 gw 10.201.32.41 ppp0

so my routing table is:

185.10.10.10    10.201.32.41    255.255.255.255 UGH   0      0        0 ppp0
10.201.32.41    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
10.11.12.0      0.0.0.0         255.255.255.0   U     0      0        0 br0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
0.0.0.0         10.201.32.41    0.0.0.0         UG    0      0        0 ppp0

now when I delete my default route and add my VPS as default route I get the error:

route: SIOC[ADD|DEL]RT: No such process

I still can access my VPS with the single static route to my VPS but the default route is not accepted.

Is it possible to do such thing?

Khaled
  • 36,533
  • 8
  • 72
  • 99
mojtabaf
  • 1
  • 1

0 Answers0