LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 08-19-2003, 11:17 AM   #1
dan5009
LQ Newbie
 
Registered: Aug 2003
Posts: 1

Rep: Reputation: 0
how to drop all packets to one host with the default rule of accept


I am trying to restrict all access to one host behind my firewall and then open only web services. Our setup is we accept all packets and then deny what we do not want. Listed below is what I,ve written which does not work:

ipchains -A input -i $EXTERNAL_INTERFACE -p tcp --syn \
--dport $UNPRIV_PORTS -j DROP

ipchains -A output -i $EXTERNAL_INTERFACE -p tcp --syn \
--sport $UNPRIV_PORTS \
-s $APERIO -j DROP

ipchains -A input -i $EXTERNAL_INTERFACE -p tcp --syn \
--dport $PRIV_PORTS \
-d $APERIO -j DROP

ipchains -A output -i $EXTERNAL_INTERFACE -p tcp --syn \
--sport $PRIV_PORTS \
-s $APERIO -j DROP

ipchains -A input -i $EXTERNAL_INTERFACE -p tcp \
--sport $UNPRIV_PORTS \
-d $APERIO --dport 80 -j ACCEPT

ipchains -A output -i $EXTERNAL_INTERFACE \
-p tcp ! --syn -s $APERIO --sport 80 \
--dport $UNPRIV_PORTS -j ACCEPT

Thanks
 
Old 08-20-2003, 06:55 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,564
Blog Entries: 54

Rep: Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928
Except that ipchains doesnt use DROP but DENY, try activating rule logging (-l) and see what gets denied. It's the best way to learn troubleshooting firewall problems yourself.
 
  


Reply


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
Ability to sniff, process and drop packets kidskc Linux - Networking 1 08-18-2005 02:40 AM
drop packets for specific port with iptables ohcarol Linux - Security 1 07-03-2005 11:48 AM
drop incoming/outgoing packets using iptables doshiaj Linux - Security 1 06-08-2004 11:38 AM
How to intentionally drop packets? imarunner Linux - Networking 5 12-31-2003 09:10 AM
why does the kernel drop packets ? mr.moto Linux - Networking 3 12-08-2002 01:47 AM


All times are GMT -5. The time now is 08:33 PM.

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