Results 1 to 3 of 3

Thread: Port forwarding

  1. #1
    Join Date
    Dec 2008

    Port forwarding

    I am trying to forward 514/tcp to 5515/tcp. I followed some guides but they didn't work. Can someone please provide the cmd? I am on the latest version of the server OS.

  2. #2
    Join Date
    Mar 2007

    Re: Port forwarding

    Do you mean by iptables?

    In iptables:
    -A PREROUTING -i eno1 -p tcp -m tcp --dport 1337 -j DNAT --to-destination

    1337 is outside port, 8000 inside port

  3. #3
    Join Date
    Nov 2008
    Metro Boston
    Kubuntu 20.04 Focal Fossa

    Re: Port forwarding

    If you're trying to redirect traffic arriving on the server to another port on the same server, use REDIRECT. Try this:

    iptables -t nat -A PREROUTING -p tcp -j REDIRECT --to-port 5515  --destination-port 514
    The rule in the previous post is designed to send traffic arriving on one port to another machine and potentially a different port.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts