M
M
Maxim2012-12-28 08:56:22
VPN
Maxim, 2012-12-28 08:56:22

How to forward port for VPN?

There is a VPN server on Freebsd, the mpd daemon is used. There is also a Debian server.
You need to connect to the VPN using the IP of the Debian server, as if the VPN is installed on it. Obviously, you need to forward the port.
I do this (found somewhere on the net):
iptables -t nat -A POSTROUTING -s <freebsd_ip> -o venet0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp -d <debian_ip> --dport 1723 -j DNAT --to-destination <freebsd_ip>:1723
iptables -t filter -A FORWARD -i venet0 -d <freebsd_ip> -p tcp --dport 1723 -j ACCEPT

VPN cannot connect. If I change the port to 80, then the Apache response from the freebsd machine is visible, that is, port forwarding is functioning in some form.
What did I do wrong and how do I do it right?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question