Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help with iptables.... I think 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
centran
n00b
n00b


Joined: 02 Nov 2005
Posts: 18

PostPosted: Wed Nov 02, 2005 7:41 pm    Post subject: help with iptables.... I think iptables Reply with quote

Can anyone help me with what I believe is an iptables routing issue. Or perhaps you know another good forum. I hear this one is the best.

What is happening is that whenever my internet goes down(adsl) the entire network gets knocked out. I know this because quickbooks freaks out because it loses connection to it's network drive(on samba). Now if the internet is down for a long time I can reconnect the drive and everything is fine without the internet. The network just freaks when the adsl kicks out but will be fine if I manualy go in and reconnect the network drives.
The network drive is connected by computer name and not IP which is probably a mistake and that is most likely a quick fix. However, I would like to know why this is happening as the internet should have nothing to do with the internal network. Does not make sense. My guess is there is something wrong with my routing so I am going to post my firewall script.

eth0 is connected to the adsl modem witch brings up ppp0.
eth1 is connected to a switch which has the rest of the network

Here is the iptables rules.

Code:

iptables -t nat -F
iptables -t filter -F
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -t filter -A INPUT -i ppp0 -s 192.168.0.0/16 -j DROP

#accept all connections for servers
iptables -t filter -A INPUT -p tcp -i ppp0 --dport smtp -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport pop3 -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport imap2 -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport auth -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport domain -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport finger -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport telnet -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport ssh -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport www -j ACCEPT
iptables -t filter -A INPUT -p tcp -i ppp0 --dport ftp -j ACCEPT

##ntp
iptables -t filter -A INPUT -p tcp -i ppp0 --dport 123 -j ACCEPT

iptables -t filter -A INPUT -p tcp -i ppp0 --dport 443 -j ACCEPT

#drop anything else that comes in(Firewall)
iptables -t filter -A INPUT -p tcp -i ppp0 --syn -j DROP


Any ideas? Is this even a iptables routing probelm? Thanks for your help.
Back to top
View user's profile Send private message
jon_vas
n00b
n00b


Joined: 14 May 2004
Posts: 37
Location: somewhere

PostPosted: Thu Nov 03, 2005 12:26 am    Post subject: Reply with quote

Seems like you are running some needed services from the internet to me.

http://www.gentoo.org/doc/en/home-router-howto.xml
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