0

after the pptp is up, I found there is an entry in route table:

default via 10.0.0.1 dev ppp5
default via 192.168.1.1 dev vlan2  metric 1

This directs all outgoing traffics through 10.0.0.1 which is the VPN gateway. But I want route all traffic through local gateway 192.168.1.1 except certain address for example 172.217.26.36. I try to delete the default via 10.0.0.1 dev ppp5. Then try to add a new entry:

ip route add 172.217.26.36 via 10.0.0.1 dev ppp5

this always failed with: RTNETLINK answers: No such process

Any idea how to achieve this?

Thanks!

1 Answer 1

2

A subnet mask is required, the proper command would be:

ip route add 10.0.0.1/32 dev ppp5

ip route add 172.217.26.36/32 via 10.0.0.1 dev ppp5

Source

2
  • # ip route add 172.217.26.36/32 via 10.0.0.1 dev ppp5 RTNETLINK answers: No such process
    – Wang
    May 4, 2016 at 12:13
  • @Wang it doesn't know what 10.0.0.1 is because you deleted the default route, you need to add a gateway first. I updated my answer.
    – acejavelin
    May 4, 2016 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .