0

I'm following this tutorial about openVPN, every goes good until this following step on client (just before autostart section from wiki):

# ip route add VPNSERVER_IP via LOCALGATEWAY_IP dev eth0  proto static
# ip route change default via 10.9.8.5 dev tun0  proto static   //client tun0 10.9.8.5

I'm losing internet after 2nd line.

And I really want to have internet thru VPN server.

those tips can help me:

  1. how to roll back with ip route ?
  2. how to configure my client with graphical interface (kubuntu) ?

1 Answer 1

0
how to roll back with ip route ?

In order to show the routing cache, you can use the following command:

ip route show cache

You can clear the cache by issuing the following one:

ip route flush cache

or e.g.

route del -net 10.66.66.66/24

for seperate rules.


As far as OpenVPN is concerned, the only routing setting I had to do was the following one (note: i used iptables to do so):

iptables -t nat -A POSTROUTING -s 10.66.66.0/24 -o eth0 -j SNAT --to xxx.xx.xxx.xxx

Where xxx.xx.xxx.xxx would be the static (public) IP address of your server and 10.66.66.0 would be the virtual network between all VPN connected machines. You should replace these with your own values.


I hope this already helps you in finding a solution. If you've further questions just let me know in a comment.

You must log in to answer this question.

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