Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to UNforward a port using iptables...?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rowdy
n00b
n00b


Joined: 08 Apr 2004
Posts: 65
Location: Venlo, the Netherlands

PostPosted: Wed Jul 19, 2006 7:48 pm    Post subject: [SOLVED] How to UNforward a port using iptables...? Reply with quote

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... :oops:

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
View user's profile Send private message
tutaepaki
Apprentice
Apprentice


Joined: 11 Nov 2003
Posts: 279
Location: New Zealand

PostPosted: Wed Jul 19, 2006 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
rowdy
n00b
n00b


Joined: 08 Apr 2004
Posts: 65
Location: Venlo, the Netherlands

PostPosted: Wed Jul 19, 2006 8:53 pm    Post subject: Reply with quote

Thanks, that worked like a charm!
_________________
Rowdy.nl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum