Note! Linux based operating system must be installed on the server.
Note! Set correct port and IP address of the server with proxy installed.
iptables -t nat -A PREROUTING -p tcp --dport 1337 -j DNAT --to-destination 127.0.0.1:1337
iptables -t nat -A POSTROUTING -j MASQUERADE
Note! Set correct IP address of the server with VPN installed.
iptables -t nat -A PREROUTING -p tcp --dport 1723 -j DNAT --to-destination 127.0.0.1:1723
iptables -t nat -A PREROUTING -p gre -j DNAT --to-destination 127.0.0.1
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -A INPUT -p gre -j ACCEPT
iptables -A FORWARD -p gre -j ACCEPT
iptables-save
apt-get install iptables-persistent
Open configuration file /etc/sysctl.conf
and add the next lines:
net.ipv4.ip_forward=1
net.netfilter.nf_conntrack_helper=1
sysctl -p
modprobe ip_nat_pptp
Open configuration file /etc/modules
and add the next line:
ip_nat_pptp