From: "ads nat" Subject: Re: Setting up default policy to 'DROP' problem Date: Wed, 04 Feb 2004 10:56:57 +0530 Sender: netfilter-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; format=flowed; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: adsnat@hotmail.com, JALaramie@Loudoun-Fairfax.com, netfilter@lists.netfilter.org Hi, It's working. It was my fault. I am getting Internet bandwidth through iptunnel. IP address of tunnel and = my eth0 is different. I was giving access to INPUT for eth0 IP and not for= =20 IP of tunnel which is my Internet IP. Your suggestion of using log at the end of INPUT rule has given this hit. Thanks for support. >From: "ads nat" >To: adsnat@hotmail.com, JALaramie@Loudoun-Fairfax.com,=20 >netfilter@lists.netfilter.org >Subject: Re: Setting up default policy to 'DROP' problem >Date: Wed, 04 Feb 2004 08:26:13 +0530 > >Following are my iptable rules > >xxx.xxx.xxx.xxx is internet ip. >eth0 internet interface >eth1 lan interface > >******************* >*nat >:PREROUTING ACCEPT [678915:47234902] >:POSTROUTING ACCEPT [36934:2160799] >:OUTPUT ACCEPT [35607:2143032] >-A POSTROUTING -o tunnel0 -j MASQUERADE >COMMIT ># Completed on Wed Feb 4 08:15:38 2004 ># Generated by iptables-save v1.2.7a on Wed Feb 4 08:15:38 2004 >*mangle >:PREROUTING ACCEPT [15137995:7366304630] >:INPUT ACCEPT [5934119:3407840707] >:FORWARD ACCEPT [9046926:3942957156] >:OUTPUT ACCEPT [5005001:930279054] >:POSTROUTING ACCEPT [14042840:4872546468] >COMMIT ># Completed on Wed Feb 4 08:15:38 2004 ># Generated by iptables-save v1.2.7a on Wed Feb 4 08:15:38 2004 >*filter >:INPUT DROP [6317:1242856] >:FORWARD DROP [107:11548] >:OUTPUT ACCEPT [841:137965] >-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j ACCEPT >-A INPUT -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT >-A INPUT -d 127.0.0.1 -i lo -j ACCEPT >-A INPUT -s 127.0.0.1 -i lo -j ACCEPT >-A INPUT -s 192.168.0.1 -i lo -j ACCEPT >-A INPUT -s xxx.xxx.xxx.xxx -i lo -j ACCEPT >-A INPUT -d xxx.xxx.xxx.xxx -m state --state RELATED,ESTABLISHED -j ACCEPT >-A FORWARD -i eth1 -j ACCEPT >-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT >-A FORWARD -i eth0 -o eth1 -j ACCEPT >-A FORWARD -i eth1 -o eth2 -j ACCEPT >-A OUTPUT -o eth0 -p tcp -m tcp -j ACCEPT >-A OUTPUT -o eth0 -p tcp -m tcp -j ACCEPT >-A OUTPUT -s 127.0.0.1 -j ACCEPT >-A OUTPUT -s 192.168.0.1 -j ACCEPT >-A OUTPUT -s xxx.xxx.xxx.xxx -j ACCEPT >COMMIT > > >********************* > >With these rules LAN users can access to internet but from server I can no= t=20 >access to internet. I get error "resolving host". > >Help me to solve this problem. > >Thanks for support. > > >>From: "ads nat" >>To: JALaramie@Loudoun-Fairfax.com, netfilter@lists.netfilter.org >>Subject: Re: Setting up default policy to 'DROP' problem >>Date: Tue, 03 Feb 2004 21:23:04 +0530 >> >>I realy appretiat your support and feelings to help others. >> >>With your support I have succedded in setting up default policy drop for = >>INPUT, OUTPUT and FORWARD. Will post rules soon. >> >>I know I have taken long time to understand this technology. But I can no= t=20 >>rush until I get my fundas clear. >>Once again Thanks for support. >> >> >>>From: Jeffrey Laramie >>>To: netfilter@lists.netfilter.org >>>Subject: Re: Setting up default policy to 'DROP' problem >>>Date: Tue, 03 Feb 2004 08:49:39 -0500 >>> >>>ads nat wrote: >>> >>>>I have setup DMZ firewall as per Oskar Anderson tutorial on=20 >>>>Netfilter.org site. >>>> >>>>When I set up default policy to drop for INPUT, OUTPUT and FORWARD=20 >>>>chains as mentioned in the tutorial my connection drops. >>>>I am attaching my iptables rules listing. >>>>Is there anything wrong in the IPtable rules. >>>>When I setup default to ACCEPT everything works fine. >>>>Help appreciated. >>>>Thanks >>>> >>> >>>I've responded to your postings before, so I was hoping someone new migh= t=20 >>>give this a shot. I know that you've been trying for months to get this = >>>configured, but you're having problems with the basics and you've still = >>>got a long way to go. Oskar's tutorial is a great place to start, but yo= u=20 >>>may want to try reading some other documentation to see if it helps you.= =20 >>>You may also want to look at using a tool like shorewall to help you=20 >>>create rules. >>> >>>That said, I'll do what I can to help you. Try using: iptables -L -n -v = >>>-x > /var/log/iptables.report. Open up iptables.report in a text editor = >>>and turn off word wrap so you can see one rule on each line. When I=20 >>>review rules I make the font really small and print the ruleset out=20 >>>'landscape' oriented so I can see a whole rule printed out on a line. >>> >>>Look at the number of packets hitting each rule. I think you'll be=20 >>>surprised where the packets are going. Remember that the rules are=20 >>>transversed from top to bottom in each ruleset. As soon as a packet=20 >>>matches a rule it stops (except logging) and doesn't go to the next rule= =20 >>>in the chain. Try starting out with a new script and only a couple rules= .=20 >>>Test the configuration and then use iptables -L -n -v -x again to see if= =20 >>>the packets are going where you think they should. For more details you = >>>can also add logging rules then check /var/log/messages to see the packe= t=20 >>>flow in more detail. Once you have the basic routing working you can add= =20 >>>the filtering rules back in. If you have problems post your new rules=20 >>>back to the list so we can see what you've done. >>> >>>Good Luck >>> >>>Jeff >>> >>> >> >>_________________________________________________________________ >>Gifts for Him & Her. Valentine=92s Day. =20 >>http://go.msnserver.com/IN/42197.asp At MSN Shopping. >> >> > >_________________________________________________________________ >Marriage? Join BharatMatrimony.com.=20 >http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 > > _________________________________________________________________ Easiest Money Transfer to India . Send Money To 6000 Indian Towns.=20 http://go.msnserver.com/IN/42198.asp Easiest Way To Send Money Home!