openVPN + dnsmasq on OpenVZ VPS help

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
tripialos
OpenVpn Newbie
Posts: 4
Joined: Wed May 02, 2012 1:46 pm

openVPN + dnsmasq on OpenVZ VPS help

Post by tripialos » Wed May 02, 2012 2:01 pm

:cry:

Greetings

First of all congratulation for this fantastic opensource vpn development.

I have followed this guide in order to install openvpn with dnsmasq on my VPS located in Switzerland.

Everything when smooth during the installation and my openvpn server started successfully.
I do can connect on the vpn server as a client without any problems, i can also successively ping the openvpn server from my laptop (ping 10.8.0.1).

However, when i open my firefox and check my ip (whatismyip.com) i noticed that i dont have the ip of my vps but instead i still have my original. I have searched many forums and tried all sort of solutions but still i cant figure out why is not working. Despite the fact that i can connect to the openvpn server my web browsing still uses my original ip.

Here is my iptables: http://pasteit.com/17656
Here is my netstat: http://pasteit.com/17657
These are my interfaces: http://pasteit.com/17658
My server config: http://pasteit.com/17665

Thanks

tripialos
OpenVpn Newbie
Posts: 4
Joined: Wed May 02, 2012 1:46 pm

Re: openVPN + dnsmasq on OpenVZ VPS help

Post by tripialos » Thu May 03, 2012 3:14 pm

anyone :-(

jannus
OpenVpn Newbie
Posts: 1
Joined: Sat May 05, 2012 6:12 am

Re: openVPN + dnsmasq on OpenVZ VPS help

Post by jannus » Sat May 05, 2012 6:15 am

Line 191 says:
push "redirect-gateway defi1"

give it a try with
push "redirect-gateway def1"

Don't forget to restart the OpenVPN server process.

tripialos
OpenVpn Newbie
Posts: 4
Joined: Wed May 02, 2012 1:46 pm

Re: openVPN + dnsmasq on OpenVZ VPS help

Post by tripialos » Sat May 05, 2012 12:54 pm

I solved it when started the installation from the begining and added the following rules in rc.local

Code: Select all

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 81.17.**.**

/etc/init.d/dnsmasq restart

exit 0


Post Reply