LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-23-2006, 10:36 AM   #1
Kumado
Member
 
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73

Rep: Reputation: 25
Input Filter


hey all,

Except for missing logging, is there any reason to do:

iptables -A INPUT -i $EXT_IFACE -s 127.0.0.0/8 -j LOG --log-prefix "RFC - 127/8"--log-tcp-options --log-ip-options
iptables -A INPUT -i $EXT_IFACE -s 127.0.0.0/8 -j DROP
iptables -A INPUT -i $EXT_IFACE -s 192.168.0.0/16 -j LOG --log-prefix "RFC - 192/20"--log-tcp-options --log-ip-options
iptables -A INPUT -i $EXT_IFACE -s 192.168.0.0/16 -j DROP
iptables -A INPUT -i $EXT_IFACE -s 172.16.0.0/12 -j LOG --log-prefix "RFC - 172/20"--log-tcp-options --log-ip-options
iptables -A INPUT -i $EXT_IFACE -s 172.16.0.0/12 -j DROP
iptables -A INPUT -i $EXT_IFACE -s 10.0.0.0/8 -j LOG --log-prefix "RFC - 10/8"--log-tcp-options --log-ip-options
iptables -A INPUT -i $EXT_IFACE -s 10.0.0.0/8 -j DROP

iptables -A INPUT -i $EXT_IFACE -s $LAN_NET -d $ANYWHERE -j LOG --log-prefix "Spoof ! "--log-tcp-options --log-ip-options
iptables -A INPUT -i $EXT_IFACE -s $LAN_NET -d $ANYWHERE -j DROP
iptables -A INPUT -i $EXT_IFACE -s $DMZ_NET -d $ANYWHERE -j LOG --log-prefix "Spoof ! "--log-tcp-options --log-ip-options
iptables -A INPUT -i $EXT_IFACE -s $DMZ_NET -d $ANYWHERE -j DROP

or just do:

iptables -A INPUT -i $EXT_IFACE -d !EXT_IP -j DROP


Would this not reject all ips except the one ip that I should get, right?
I would just miss specific logging?

thanks
 
Old 03-23-2006, 11:12 AM   #2
demian
Member
 
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303

Rep: Reputation: 30
You're right. The last command drops all packages that all the previous commands combined drop and then some.

The idea is that having a packet come into the external interface with a private source IP or your LAN/DMZ IP is a pretty serious sign of malicious intend since that packet has most likely been tampered with.
 
Old 03-23-2006, 05:58 PM   #3
Kumado
Member
 
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73

Original Poster
Rep: Reputation: 25
hmmmm, ok. That is what I thought. Is that a good idea?

That leaves me to just my ip to deal with. If I disable pint to my EXT, it would be harder to find.

What would be the next best thing to test for?

Should I see if it is related / estasblished or reject other things like DNS or DHCP requests?

Thank you for your reply btw.

Kumado
 
Old 03-23-2006, 05:58 PM   #4
Kumado
Member
 
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73

Original Poster
Rep: Reputation: 25
hmmmm, ok. That is what I thought. Is that a good idea?

That leaves me to just my ip to deal with. If I disable ping to my EXT, it would be harder to find.

What would be the next best thing to test for?

Should I see if it is related / estasblished or reject other things like DNS or DHCP requests?

Thank you for your reply btw.

Kumado
 
  


Reply



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
Ctrl+Shift Unicode input gone, after installing Japanese Input Methodes polemon Linux - Newbie 1 09-20-2005 05:17 PM
Sendmail: timeout waiting for input from local during Draining Input andrewstr Linux - Software 0 07-14-2004 01:43 PM
Spam filter to external mail filter deadlock Linux - Software 1 06-16-2004 02:28 AM
filter martini1050 Linux - General 0 03-01-2004 02:07 PM
my mouse input is takes as keyboard input in BASH e1000 Slackware 5 12-08-2003 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration