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 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -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:
net.ipv4.ip_forward=1
I don't know if it matters, but I have dnsmasq installed from my OpenVPN configuration, and I've set that to listen to 10.9.0.1 (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:
http://library.linode.com/networking/openvpn/ubuntu-10.04-lucid
Thanks in advance for the help!