Jump to content
  • 0

How to remove port forwarding?


Khan Honney
 Share

Question

  • 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

 Share

×
×
  • Create New...