I would like to be able to connect to the office network and access the internet through that network and the servers within the network. I use a server running Ubuntu Server (fully updated) behind a router which acts as PPTP server. It is set up like this:
Office
Router delivers IP's in the range of 192.168.1.1-253, the router has IP 192.168.1.254. The Ubuntu Server running PPTP server has IP 192.168.1.102 (static, delivered by the router).
Home
A network using the same range (192.168.1.1-255). I tried to connect through Ubuntu and MacOSX, both give the same result.
PPTP Settings
/etc/pptpd.conf
localip 192.168.1.102 remoteip 192.168.1.110-200
/etc/sysctl.conf
net.ipv4.ip_forward=1
/etc/rc.local
sysctl -w net.ipv4.ip_forward=1 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/etc/ppp/pptpd-options
ms-dns 8.8.8.8 ms-dns 8.8.4.4
(not really necessary I guess, but just to be sure)
Of course, I forwarded port 1723 to 192.168.1.102 and opened the port on the Ubuntu server (ufw allow pptp
)
Current situation
I could connect to the VPN and also access the internet. According to www.whatismyip.com I do have the office IP, so that part works. I am able to ping 192.168.1.102, but not any of the other addresses within the network. I just don't know what to do anymore. I have followed all steps in many tutorials, but that doesn't change anything. One suggestion I also tried:
sudo iptables -A FORWARD -o ppp+ -i eth0 -s 192.168.1.0/24 -d 192.168.1.0/24 -j ACCEPT
sudo iptables -A FORWARD -i ppp+ -o eth0 -s 192.168.1.0/24 -d 192.168.1.0/24 -j ACCEPT
I don't know exactly what that does, but it didn't work anyways.