Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-24-2004, 04:28 AM   #1
Registered: Jul 2003
Location: sweden
Distribution: gentoo @home, RH @ school
Posts: 107

Rep: Reputation: 15
iptables behind a router

I'm having a (what I believe) network problem wich I don't seem to be able to solve, so if there's anybody who likes to solve or sourting out the problem, I'd glad.

I have DHCP (adsl) internet access which works fine (program keeps me logged on automaticly) via a dlink 604 router. Firefox and so on works fine, the problem shows when I start nessus (after nessusd -D) when I log in I get 'could not open a connection to localhost'. I'm using the dhcp script of oscar andreasson with:
$IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 1241 -j allowed
$IPTABLES -A udp_packets -p UDP -s 0/0 --source-port 1241 -j ACCEPT
also in the dlink 604 router I have created a virtual server on the same port to

The same thing goes for dcgui-qt (direct connect clone). I can't connect to hubs in active mode. I've done the same thing as above with the following added in the iptables script described by axljab
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -j DNAT -p tcp -i eth0 --dport 9176 --to-destination
iptables -t nat -A PREROUTING -j DNAT -p udp -i eth0 --dport 9176 --to-destination
I didn't think these were related untill I added trigger 1241 + 9176. Both suddenly worked, for about 2 hours... After it stopped working I added 1241 + 9176 to inbound ports, no change...

Now I don't understand why they're not working. I tried to turn of the iptables script, no change and put the puter on dmz, no change. If I plug out the router and stick the cable into the eth0 the network won't start. It could be many things and I'm returning to the same problems now so I an outside point of view...

Last edited by matador; 08-24-2004 at 05:17 AM.
Old 08-25-2004, 10:09 AM   #2
Registered: Jul 2003
Location: sweden
Distribution: gentoo @home, RH @ school
Posts: 107

Original Poster
Rep: Reputation: 15
It works now. What I've done is again to turn off the iptables script, the router, the computer and the adsl modem. Somehow it works now but not before... It must have been the restart with the iptables script off and not loading or the long cooling of for the router...

I got this router not too long ago so I guess it's my iptables script that needs adjustment for beeing after a nat router (di 604) with a dhcp connection. Could someone please spell this out to me (sorry I'm a bit dyslectic - not a good combo with the rtfm...) how does a firewall script change behind a router. The router only forwards three ports inbound. Do I even need a firewall? I know a lot of people debate this one and I prefer safer.

I'd be very thankfull for an explanation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables and linksys router robrecc Linux - Networking 1 11-25-2005 04:34 PM
iptables linksys router robrecc Linux - Security 1 11-25-2005 12:14 PM
AppleTalk over IPTABLES router lumux Linux - Networking 0 12-15-2003 07:34 AM
iptables and hardware router te_conway Linux - Security 1 08-29-2002 06:14 PM
iptables router bbenz3 Linux - Networking 7 02-28-2002 08:53 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration