Skip to contentSkip to conversation

simply confusing

DISCUSSION Ralph Churchill 5 participants 6 messages Jan 23, 2003

lore
Share & tools
lore
#0 lore raw

I work at a large company and was having some fellow employees regularly scanning my box... so I put up a little firewall. Here's my one and only rule:

iptables -A INPUT --source 192.168.0.0/16 -j DROP

Now, shouldn't that block any and ALL traffic from any computer on the 192.168.*.* subnet? Do I need to be more explicit? I also have snort running and I see some stuff getting through... Thanks.

RMC

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

#1 lore raw

On 23/01/03 Ralph Churchill did say:

Quoted 10 lines

I work at a large company and was having some fellow employees regularly scanning my box... so I put up a little firewall. Here's my one and only rule:

iptables -A INPUT --source 192.168.0.0/16 -j DROP

Now, shouldn't that block any and ALL traffic from any computer on the 192.168.*.* subnet? Do I need to be more explicit? I also have snort running and I see some stuff getting through... Thanks.

You'll see it with a sniffer regardless. That's a good thing. If you
want to see what it's dropping, jump to a chain that logs it, and then drops it.

Mike

Signature · 4 lines
Michael P. Soulier <[email protected]>, 613-592-2122 x2522
SME Solutions, Mitel Networks Corporation
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
#2 lore raw
In reply to Ralph Churchill
Quoted 4 lines

iptables -A INPUT --source 192.168.0.0/16 -j DROP

Now, shouldn't that block any and ALL traffic from any computer on the 192.168.*.* subnet?

well that is enough to block all packets from that subnet, however, maybe you have other rules that accept traffic before this rule.
try -I INPUT to put it at the begining of the chain.

Regards,
Maciej Soltysiak

#3 lore raw

Well, I added a logging rule before that:

iptables -A INPUT --source 10.11.0.0/16 \
-j LOG --log-level info --log-prefix "iptables "

But when ever something gets through, it isn't being logged either... If I do "iptables -L -v", then I see that both rules (first the LOG, then the DROP) have the same packet count.

I can try using "-I" instead, but I'd also like to log, so how would I do that? Am I missing something fundamental?

RMC

Quoted 12 lines · --- Maciej Soltysiak
Quoted 3 lines

iptables -A INPUT --source 192.168.0.0/16 -j DROP

Now, shouldn't that block any and ALL traffic from

any

Quoted 1 line

computer on the 192.168.*.* subnet?

well that is enough to block all packets from that subnet,
however, maybe you have other rules that accept traffic before
this rule.
try -I INPUT to put it at the begining of the chain.

Quoted 3 lines

Regards,
Maciej Soltysiak

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

#4 lore raw
Quoted 5 lines

Well, I added a logging rule before that:

iptables -A INPUT --source 10.11.0.0/16 \
-j LOG --log-level info --log-prefix "iptables "

Quoted 7 lines

But when ever something gets through, it isn't being logged either... If I do "iptables -L -v", then I see that both rules (first the LOG, then the DROP) have the same packet count.

I can try using "-I" instead, but I'd also like to log, so how would I do that? Am I missing something fundamental?

iptables -N log_drop
iptables -A log_drop -j LOG --log-level info --log-prefix "ipt:log_drop "
iptables -A log_drop -j DROP

iptables -I INPUT 1 -s 10.11.0.0/16 -j log_drop

What about this ?

Rob

#5 lore raw
In reply to Ralph Churchill

that is a bit vague...for instance if the clients' gateways are other boxes/routers/firewalls, and your attacked client is on the same LAN as the attackers, then your little firewall will do little to filter those
packets. What's your infrastructure? In other words, does your
'attacked' client reside on a separate NIC off the little firewall and you are forwarding to it? if so, you need to filter on the FORWARD chain, etc.

to make a sound and viable isolated network off of a firewall, it should reside on it's own NIC and the firewall will filter packets as they get passed from NIC to NIC or Network to Network.

check out the Iptables tutorial for more info:
http://iptables-tutorial.haringstad.com/iptables-tutorial.html

Quoted 20 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ralph Churchill
Sent: Thursday, January 23, 2003 3:03 PM
To: [email protected]
Subject: simply confusing

I work at a large company and was having some fellow employees regularly scanning my box... so I put up a little firewall. Here's my one and only rule:

iptables -A INPUT --source 192.168.0.0/16 -j DROP

Now, shouldn't that block any and ALL traffic from any computer on the 192.168.*.* subnet? Do I need to be more explicit? I also have snort running and I see some stuff getting through... Thanks.

Quoted 5 lines

RMC

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

http://mailplus.yahoo.com