View previous topic :: View next topic |
Author |
Message |
rowdy n00b
Joined: 08 Apr 2004 Posts: 65 Location: Venlo, the Netherlands
|
Posted: Wed Jul 19, 2006 7:48 pm Post subject: [SOLVED] How to UNforward a port using iptables...? |
|
|
Hi there...
Stupid me; while setting up a vnc server on my internal server (worked like a charm using the forum and wiki) I wanted to forward some ports in my router to my internal box (which has vnc). Not much a problem, but stupid me did a little to fast copy paste...
Code: | iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to 192.168.0.241 |
I also did a iptables save and restart, and now I did forward all http connections to my internal box... Stupid, stupid...
Does anybody know how to drop that rule?
iptables -L does not show any http port...?
Just flushing the whole ruleset is not an option; I've numerous ports forwarded, and I want to lerarn something...
Thanks in advance... _________________ Rowdy.nl
Last edited by rowdy on Wed Jul 19, 2006 8:53 pm; edited 1 time in total |
|
Back to top |
|
|
tutaepaki Apprentice
Joined: 11 Nov 2003 Posts: 279 Location: New Zealand
|
Posted: Wed Jul 19, 2006 8:44 pm Post subject: |
|
|
Code: | iptables -t nat -L PREROUTING -n -v --line-numbers |
will give you a list of your rules including line numbers, then you can
Code: | iptables -t nat -D PREROUTING x |
|
|
Back to top |
|
|
rowdy n00b
Joined: 08 Apr 2004 Posts: 65 Location: Venlo, the Netherlands
|
Posted: Wed Jul 19, 2006 8:53 pm Post subject: |
|
|
Thanks, that worked like a charm! _________________ Rowdy.nl |
|
Back to top |
|
|
|