Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-23-2006, 11:36 AM
|
#1
|
Member
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73
Rep:
|
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
|
|
|
03-23-2006, 12:12 PM
|
#2
|
Member
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303
Rep:
|
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.
|
|
|
03-23-2006, 06:58 PM
|
#3
|
Member
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73
Original Poster
Rep:
|
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
|
|
|
03-23-2006, 06:58 PM
|
#4
|
Member
Registered: Oct 2003
Location: Ohio , USA
Distribution: up to Suse 15.1
Posts: 73
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:28 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|