Skip to content

Port forwarding

Ycarus edited this page Jun 6, 2018 · 28 revisions

You need to have Glorytun configured on OpenMPTCProuter. If you want to do this manually follow this guide.

VPS configuration

On the VPS, you need to uncomment last lines of /etc/shorewall/rules to forward ports from the VPS to OpenMPTCProuter via GloryTUN like this:

DNAT        net     vpn:10.0.0.2      tcp     1-64999
DNAT        net     vpn:10.0.0.2      udp     1-64999

And restart shorewall:

systemctl restart shorewall

OpenMPTCProuter configuration

Example to redirect port 80 from the VPS to the IP 192.168.100.3 on the network:

First we have to forward the port. Add a new forward rule: Configure it like this:

It's a webserver, we need SNAT here. A a new SNAT rule: Configure it like this: