General discussion

  • Creator
    Topic
  • #2189278

    Local Port Forwarding

    Locked

    by cxy ·

    Hi,

    I need to map local port to another local port.

    For example, access to port 80 will be forwarded to 8005.

    Sounds silly, but this is because my network admin can not open access to port 8005 on the firewall, only to http service which in on port 80. I can not change the port 8005.

All Comments

  • Author
    Replies
    • #3060158

      Reply To: Local Port Forwarding

      by nico baggus ·

      In reply to Local Port Forwarding

      It depends a little:

      If you have linux (iptables netfilter is
      assumed) and want something remote incoming to
      port 80 map unto port 8005:

      iptables -t nat -I PREROUTING –dport 80 -m
      state –state NEW -p tcp –sync -j DNAT –to
      127.0.0.1:8005

      You can of course add -s and -d to it to only
      accept from certain sources to certain
      destinations -i for the incoming interface.
      You can change 127.0.0.1 to point to any host on
      your network.

      Hope this helps,

    • #3060021

      Reply To: Local Port Forwarding

      by cxy ·

      In reply to Local Port Forwarding

      This question was closed by the author

Viewing 1 reply thread