Jump to content
  • 0

How to remove port forwarding?

Khan Honney


  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

Check that which port forwardings exist in your system with below command.

sudo iptables -t nat --line-numbers -L

The command above should give an output live below

Chain PREROUTING (policy ACCEPT)num  target     prot opt source               destination         1    REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:https redir ports 54432    REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:http redir ports 5080...

Delete the rule by line number. For instance to delete the http -> 5080 forwarding, run the command below

iptables -t nat -D PREROUTING 2

parameter 2 is the line number, if you want to delete https -> 5443, you should use 1 instead of 2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...