Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have a VPS with an OpenVPN server configured and running without a hitch. However, since I want to be able to use it as a VPN server for my iPhone as well, I've decided to switch to PPTP. I installed it and I can connect to the server, but no matter what I do my computers and phone still show their own IP instead of the server's. So my guess is that I haven't properly configured the server to route everything through it, like I intend. I've followed a bunch of tutorials and tried all sorts of combinations, but nothing seems to work.

When I set up my OpenVPN configuration I included these iptables rules:

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE

Since I just followed a tutorial I'm not entirely sure what they do, but they appear to be what's responsible for the server's IP address being adopted by the clients.

For my PPTP configuration, I've added this line to iptables and included it in /etc/rc.local to ensure it's executed at boot, which according to my understanding should forward the server's IP address:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

I've also enabled this in /etc/systcl.conf:


I don't know if it matters, but I have dnsmasq installed from my OpenVPN configuration, and I've set that to listen to (the ppp0 address for my PPTP server).

Regardless, whenever I check my IP using whatismyip.com or any other checker, I get my original IP instead of the server's. If I connect using OpenVPN, I get the server's IP instead.

If it's of any importance, this is the guide I followed to set up the original OpenVPN server, I don't know if any of the settings used there are what's causing my problem:


Thanks in advance for the help!

share|improve this question

closed as too localized by fabricator4, jrg Jan 11 '13 at 20:13

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

When you say it still shows their own IP's where are you exactly seeing this? On your internal networks side or on the internet side of the connection? –  Scott Stookey Feb 15 '12 at 16:51
The internet side of the connection. If my computer has the IP and my server, when I connect to my OpenVPN, other machines on the internet see my computer as, e.g. when I go to www.whatismyip.com. This is what I'm trying to achieve with PPTP as well. –  Aleks Feb 16 '12 at 1:40
This does not provide an answer –  Ringtail Jan 10 '13 at 4:20
This question appears to be abandoned. Unaccepted answer or unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Flagged for deletion. Thanks! –  Ringtail Jan 10 '13 at 4:21

Browse other questions tagged or ask your own question.