Setup Port Forwarding for user1 find/replace YourVPSIPHere with your server/VPS IP. This will open port 32400 to the user1 internal vpn IP iptables -t nat -A PREROUTING -d YourVPSIPHere -p tcp --dport 32400 -j DNAT --to-dest 32400 iptables -t filter -A INPUT -p tcp -d --dport 32400 -j ACCEPT

The rule uses the NAT packet matching table (-t nat) and specifies the built-in POSTROUTING chain for NAT (-A POSTROUTING) on the firewall's external networking device (-o eth0).POSTROUTING allows packets to be altered as they are leaving the firewall's external device. The -j MASQUERADE target is specified to mask the private IP address of a node with the external IP address of the firewall Port Forwarding - Docs Nov 16, 2018 Linux: Block Port With IPtables - nixCraft Aug 25, 2016 ssh - Port forwarding with iptables not working anymore

Port Forwarding is generally considered when you manually define a rule in the router to send all data received on some range of ports on the internet side (WAN Jack) to a port and IP address on the LAN side (LAN Jacks or Wireless Antennas). iptables is an entirely different topic,

IPTABLES port forwarding - Oct 25, 2003 How to open or close a port in IPTables - eSecureData Inc. Close a port: iptables -I INPUT -p tcp –-dport 21 -j REJECT service iptables save. Solution. Main command use to change IPTables rules has the following format: iptables -I INPUT -p tcp –-dport 80 -j ACCEPT. This opens port 80 (HTTP) for inbound connections, such as to make your web server accessible to the Internet.

Dec 05, 2008

How to open a Port in IPtables Firewall on a Linux server The above command will open the outgoing tcp port “3032” on the linux server. 3. Do not forget to save the IP tables rules : “service iptables save” You must save the iptables rules after making any changes in iptables firewall. Rules will be removed if it is not saved. Command to save the firewall rules : “service iptables … 16 IPtables port forwarding Linux Shell Tutorial - YouTube Mar 15, 2018 Port Forwarding for a Cleaner URL -