-
-
Notifications
You must be signed in to change notification settings - Fork 270
Port forwarding
Ycarus (Yannick Chabanois) edited this page Aug 27, 2020
·
28 revisions
You need to have a VPN set on OpenMPTCProuter (Glorytun TCP by default).
(this is only needed if you want to redirect all ports)
Use the checkbox in System->OpenMPTCProuter then Advanced settings tab.
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 in Network->Firewall: Configure it like this:
Port will be automatically redirected from the server to the router.
It's a webserver, we need SNAT here. A a new SNAT rule: Configure it like this:
- Check that the VPN is running in System->OpenMPTCProuter and Status tab.
- Check on the VPS in
/etc/shorewall/rules
that rules you set are available - Check on the VPS in
/etc/shorewall/params.vpn
that OMR_ADDR is the router side VPN IP (10.255.255.2 for glorytun TCP, the default VPN) - Check on the router if packets are coming on port 8080 from the VPN for example:
tcpdump -i tun0 port 8080
If all is ok, then packets come to the router. Set a SNAT rule if not already done else check your firewall rules.