Re: Block martians with source address 127.0.0.1
From: Kalevi Nyman (kan_at_canit.se)
Date: 05/31/04
- Previous message: Patrick Benson: "Re: Block martians with source address 127.0.0.1"
- Maybe in reply to: Cedric Blancher: "Re: Block martians with source address 127.0.0.1"
- Next in thread: Slack Traq: "Re: Block martians with source address 127.0.0.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 31 May 2004 19:21:28 +0200 To: Bjørn Rasmussen <bjoernr@sensewave.com>
Add commands below to your table by wrting them on the command line and
then use the command
iptables-save > /etc/sysconfig/iptables
or where you keep your table
1. iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
2. iptables -A INPUT -m state --state NEW -i eth0 -s 127.0.0.1 -j DROP
1. If the state of a packet is a response to existing connection or
related
accept the package. Else drop. If an application on a remote machine
wants to exechange packets with your computer it is allowed to do so
if you initiated the communication and only then.
2. An explicit command to drop any incoming packet that has the source
address 127.0.0.1
Regards:
Kalevi Nyman
--- Bjørn Rasmussen wrote: >Hi! > >I've firewall connected to the Internet via an ISDN-line. Sometimes >martians arrive from the Internet with source address 127.0.0.1. I want >to block these packets, but I don't find any way to set up the rules to >accomplish this. > >Normally I use "fwbuilder" to set up my rules, but since the martians >were not blocked by the spoofing-rules generated by "fwbuilder", I tried >a simple test using iptables-commands directly. > >I added these rules as the only ones to the input chain on my >LAN-interface: > >iptables -A INPUT -i eth0 -s 127.0.0.1 -j LOG >iptables -A INPUT -i eth0 -s 127.0.0.1 -j DROP >iptables -A INPUT -i eth0 -s -j LOG >iptables -A INPUT -i eth0 -s -j DROP > >>From a client on my LAN, I used the command "nmap -e <LAN-interface on >client> -S 127.0.0.1 <ip-addr. of firewalls LAN-interfac>" to spoof the >localhost address. > >The kernel on the firewall logs these packets as martians which it >should do, but my rules will not log or block these packets. Anybody >who knows how to do it? Is it possible? I guess there are situations >were malicious persons could at least perform a DoS-attack? > > >Best regards >Bjørn Rasmussen > > > >
- Previous message: Patrick Benson: "Re: Block martians with source address 127.0.0.1"
- Maybe in reply to: Cedric Blancher: "Re: Block martians with source address 127.0.0.1"
- Next in thread: Slack Traq: "Re: Block martians with source address 127.0.0.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|