* Should i be worried?
@ 2003-01-28 22:29 Erik Ahlner
2003-01-28 23:24 ` Athan
2003-01-29 1:17 ` Arnt Karlsen
0 siblings, 2 replies; 6+ messages in thread
From: Erik Ahlner @ 2003-01-28 22:29 UTC (permalink / raw)
To: netfilter
Hello!
I just happened to do a dmesg, and got this output:
IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
PREC=0x00 TTL=127 ID=14459 PROTO=UDP SPT=137 DPT=53 LEN=54
IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
PREC=0x00 TTL=127 ID=14715 PROTO=UDP SPT=137 DPT=53 LEN=54
IN=eth0 OUT=eth0 SRC=192.168.0.88 DST=217.209.28.135 LEN=48 TOS=0x00
PREC=0x00 TTL=127 ID=37469 DF PROTO=TCP SPT=2418 DPT=80 WINDOW=16384
RES=0x00 SYN URGP=0
As you can see, i get some message about traffic from 192.168.0.186 and .88
.. these two computers are NOT in my home network, so i guess that someone
has named his computers like that on the university network, even though the
university network has 130.236.x.x.
Is this a problem for me?
And what does this output actually mean?
Has someone used my computer as a router?
If they have, how is that possible?
This is what my iptable looks like:
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
$IPTABLES -A INPUT -s 192.168.0.0/24 -i eth0 -j DROP
I thought that the last line was to stop this from happening..
Or am i just stupid? Did dmesg just show me that some packets have been
dropped?
Many thanks
Erik Ahlner
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Should i be worried?
2003-01-28 22:29 Should i be worried? Erik Ahlner
@ 2003-01-28 23:24 ` Athan
2003-01-29 1:17 ` Arnt Karlsen
1 sibling, 0 replies; 6+ messages in thread
From: Athan @ 2003-01-28 23:24 UTC (permalink / raw)
To: Erik Ahlner; +Cc: netfilter
[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]
On Tue, Jan 28, 2003 at 11:29:36PM +0100, Erik Ahlner wrote:
> Hello!
>
> I just happened to do a dmesg, and got this output:
>
> IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
> PREC=0x00 TTL=127 ID=14459 PROTO=UDP SPT=137 DPT=53 LEN=54
> IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
> PREC=0x00 TTL=127 ID=14715 PROTO=UDP SPT=137 DPT=53 LEN=54
> IN=eth0 OUT=eth0 SRC=192.168.0.88 DST=217.209.28.135 LEN=48 TOS=0x00
> PREC=0x00 TTL=127 ID=37469 DF PROTO=TCP SPT=2418 DPT=80 WINDOW=16384
> RES=0x00 SYN URGP=0
>
>
> As you can see, i get some message about traffic from 192.168.0.186 and .88
> .. these two computers are NOT in my home network, so i guess that someone
> has named his computers like that on the university network, even though the
> university network has 130.236.x.x.
> Is this a problem for me?
> And what does this output actually mean?
> Has someone used my computer as a router?
> If they have, how is that possible?
> This is what my iptable looks like:
>
> $IPTABLES -P INPUT ACCEPT
> $IPTABLES -F INPUT
> $IPTABLES -P OUTPUT ACCEPT
> $IPTABLES -F OUTPUT
> $IPTABLES -P FORWARD DROP
> $IPTABLES -F FORWARD
> $IPTABLES -t nat -F
>
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
> $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
> $IPTABLES -A FORWARD -j LOG
^^^^^^
This is what causes the messages in dmesg. You probably want to change
the INPUT rule below to be a FORWARD one. Make sure to put it ABOVE the
two other FORWARD rules above, otherwise they'll get the packet first
and just pass it anyway.
> $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
> $IPTABLES -A INPUT -s 192.168.0.0/24 -i eth0 -j DROP
Actually, just go find a DECENT fw script and use that ;).
HTH,
-Ath
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Should i be worried?
2003-01-28 22:29 Should i be worried? Erik Ahlner
2003-01-28 23:24 ` Athan
@ 2003-01-29 1:17 ` Arnt Karlsen
1 sibling, 0 replies; 6+ messages in thread
From: Arnt Karlsen @ 2003-01-29 1:17 UTC (permalink / raw)
To: netfilter
On Tue, 28 Jan 2003 23:29:36 +0100,
"Erik Ahlner" <whyz@home.se> wrote in message
<000c01c2c71c$bd541090$0200a8c0@whyzpc>:
> Hello!
>
> I just happened to do a dmesg, and got this output:
>
> IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
> PREC=0x00 TTL=127 ID=14459 PROTO=UDP SPT=137 DPT=53 LEN=54
> IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
> PREC=0x00 TTL=127 ID=14715 PROTO=UDP SPT=137 DPT=53 LEN=54
> IN=eth0 OUT=eth0 SRC=192.168.0.88 DST=217.209.28.135 LEN=48 TOS=0x00
> PREC=0x00 TTL=127 ID=37469 DF PROTO=TCP SPT=2418 DPT=80 WINDOW=16384
> RES=0x00 SYN URGP=0
>
>
> As you can see, i get some message about traffic from 192.168.0.186
> and .88.. these two computers are NOT in my home network, so i guess
> that someone has named his computers like that on the university
> network, even though the university network has 130.236.x.x.
> Is this a problem for me?
..dunno, this box is yours?
[arnt@lana dropzone]$ dig -x 130.236.230.9
; <<>> DiG 9.2.1 <<>> -x 130.236.230.9
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59666
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 0
;; QUESTION SECTION:
;9.230.236.130.in-addr.arpa. IN PTR
;; ANSWER SECTION:
9.230.236.130.in-addr.arpa. 86400 IN PTR ns.student.liu.se.
;; AUTHORITY SECTION:
236.130.in-addr.arpa. 86400 IN NS sunic.sunet.se.
236.130.in-addr.arpa. 86400 IN NS ns.isy.liu.se.
236.130.in-addr.arpa. 86400 IN NS dns.liu.se.
;; Query time: 497 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Jan 29 02:01:08 2003
;; MSG SIZE rcvd: 140
> And what does this output actually mean?
> Has someone used my computer as a router?
> If they have, how is that possible?
..'cat /proc/sys/net/ipv4/ip_forward' is "1"?
..if you _dont_ wanna route traffic:
'echo "0" > /proc/sys/net/ipv4/ip_forward'
> This is what my iptable looks like:
>
> $IPTABLES -P INPUT ACCEPT
> $IPTABLES -F INPUT
> $IPTABLES -P OUTPUT ACCEPT
> $IPTABLES -F OUTPUT
> $IPTABLES -P FORWARD DROP
> $IPTABLES -F FORWARD
> $IPTABLES -t nat -F
>
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
> $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
> $IPTABLES -A FORWARD -j LOG
>
> $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
> $IPTABLES -A INPUT -s 192.168.0.0/24 -i eth0 -j DROP
>
> I thought that the last line was to stop this from happening..
..try $IPTABLES -A FORWARD -s 192.168.0.0/24 -i eth0 -j DROP
/\/\/\/\
..you also wanna drop wintendo ports 137 thru 139 or come up
with a damned good excuse to pass on this wintendo traffic.
From your inside, you may want to REJECT instead of DROP, speedier,
if you wanna teach people a lesson, try TARPIT from Patch-o-matic.
> Or am i just stupid? Did dmesg just show me that some packets have
> been dropped?
>
> Many thanks
>
> Erik Ahlner
--
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
Scenarios always come in sets of three:
best case, worst case, and just in case.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Should i be worried?
@ 2003-01-28 23:30 Preston Wade
2003-01-29 0:45 ` Erik Ahlner
0 siblings, 1 reply; 6+ messages in thread
From: Preston Wade @ 2003-01-28 23:30 UTC (permalink / raw)
To: 'Erik Ahlner', netfilter
This rule would allow someone outside your firewall to route to your
internal boxes. I wouldn't accept all connection from the external
interface to the internal interface.
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
Also I wouldn't have a default policy of ACCEPT for the INPUT chain either.
$IPTABLES -P INPUT ACCEPT
Anyway.... the log entry below is interesting because it shows that the
packet came in on eth0 and went out eth0, but given the source and
destination addresses I would think it would have came in on one interface
and gone out a different. The first two look like DNS queries based on the
DPT, but the source port is that of a NetBIOS service. The last entry looks
like potentially a legitimate web request.
Which interface is your outside?
Can you show us the output of a netstat -nr?
Thanks,
Preston
-----Original Message-----
From: Erik Ahlner [mailto:whyz@home.se]
Sent: Tuesday, January 28, 2003 4:30 PM
To: netfilter@lists.netfilter.org
Subject: Should i be worried?
Hello!
I just happened to do a dmesg, and got this output:
IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
PREC=0x00 TTL=127 ID=14459 PROTO=UDP SPT=137 DPT=53 LEN=54
IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
PREC=0x00 TTL=127 ID=14715 PROTO=UDP SPT=137 DPT=53 LEN=54
IN=eth0 OUT=eth0 SRC=192.168.0.88 DST=217.209.28.135 LEN=48 TOS=0x00
PREC=0x00 TTL=127 ID=37469 DF PROTO=TCP SPT=2418 DPT=80 WINDOW=16384
RES=0x00 SYN URGP=0
As you can see, i get some message about traffic from 192.168.0.186 and .88
.. these two computers are NOT in my home network, so i guess that someone
has named his computers like that on the university network, even though the
university network has 130.236.x.x.
Is this a problem for me?
And what does this output actually mean?
Has someone used my computer as a router?
If they have, how is that possible?
This is what my iptable looks like:
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
$IPTABLES -A INPUT -s 192.168.0.0/24 -i eth0 -j DROP
I thought that the last line was to stop this from happening..
Or am i just stupid? Did dmesg just show me that some packets have been
dropped?
Many thanks
Erik Ahlner
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Should i be worried?
2003-01-28 23:30 Preston Wade
@ 2003-01-29 0:45 ` Erik Ahlner
0 siblings, 0 replies; 6+ messages in thread
From: Erik Ahlner @ 2003-01-29 0:45 UTC (permalink / raw)
To: netfilter
----- Original Message -----
From: "Preston Wade" <Preston_Wade@hilton.com>
To: "'Erik Ahlner'" <whyz@home.se>; <netfilter@lists.netfilter.org>
Sent: Wednesday, January 29, 2003 12:30 AM
Subject: RE: Should i be worried?
> This rule would allow someone outside your firewall to route to your
> internal boxes. I wouldn't accept all connection from the external
> interface to the internal interface.
>
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
you're right.. you reccon this would be better?
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state
ESTABLISHED,RELATED -j ACCEPT
> Also I wouldn't have a default policy of ACCEPT for the INPUT chain
either.
> $IPTABLES -P INPUT ACCEPT
>
>
> Anyway.... the log entry below is interesting because it shows that the
> packet came in on eth0 and went out eth0, but given the source and
> destination addresses I would think it would have came in on one interface
> and gone out a different. The first two look like DNS queries based on
the
> DPT, but the source port is that of a NetBIOS service. The last entry
looks
> like potentially a legitimate web request.
>
> Which interface is your outside?
> Can you show us the output of a netstat -nr?
>
eth0 is the nic to the outside..
and sure, here comes the output from netstat -nr!
Destination Gateway Genmask Flags MSS Window irtt
Iface
130.236.146.0 0.0.0.0 255.255.255.0 U 40 0 0
eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 40 0 0
eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 130.236.146.1 0.0.0.0 UG 40 0 0
eth0
thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Should i be worried?
@ 2003-01-29 5:11 Preston Wade
0 siblings, 0 replies; 6+ messages in thread
From: Preston Wade @ 2003-01-29 5:11 UTC (permalink / raw)
To: 'netfilter@lists.netfilter.org'
Actually a rule will not pass through both the INPUT chain and the FORWARD
chain. The INPUT chain will be consulted if the packet is destined for the
firewall itself. If the packet is to be routed through the firewall then
the FORWARD chain will be used.
Thanks,
Preston
-----Original Message-----
From: Athan [mailto:netfilter@miggy.org]
Sent: Tuesday, January 28, 2003 5:24 PM
To: Erik Ahlner
Cc: netfilter@lists.netfilter.org
Subject: Re: Should i be worried?
On Tue, Jan 28, 2003 at 11:29:36PM +0100, Erik Ahlner wrote:
> Hello!
>
> I just happened to do a dmesg, and got this output:
>
> IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
> PREC=0x00 TTL=127 ID=14459 PROTO=UDP SPT=137 DPT=53 LEN=54
> IN=eth0 OUT=eth0 SRC=192.168.0.186 DST=130.236.230.9 LEN=74 TOS=0x00
> PREC=0x00 TTL=127 ID=14715 PROTO=UDP SPT=137 DPT=53 LEN=54
> IN=eth0 OUT=eth0 SRC=192.168.0.88 DST=217.209.28.135 LEN=48 TOS=0x00
> PREC=0x00 TTL=127 ID=37469 DF PROTO=TCP SPT=2418 DPT=80 WINDOW=16384
> RES=0x00 SYN URGP=0
>
>
> As you can see, i get some message about traffic from 192.168.0.186 and
.88
> .. these two computers are NOT in my home network, so i guess that someone
> has named his computers like that on the university network, even though
the
> university network has 130.236.x.x.
> Is this a problem for me?
> And what does this output actually mean?
> Has someone used my computer as a router?
> If they have, how is that possible?
> This is what my iptable looks like:
>
> $IPTABLES -P INPUT ACCEPT
> $IPTABLES -F INPUT
> $IPTABLES -P OUTPUT ACCEPT
> $IPTABLES -F OUTPUT
> $IPTABLES -P FORWARD DROP
> $IPTABLES -F FORWARD
> $IPTABLES -t nat -F
>
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
> $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
> $IPTABLES -A FORWARD -j LOG
^^^^^^
This is what causes the messages in dmesg. You probably want to change
the INPUT rule below to be a FORWARD one. Make sure to put it ABOVE the
two other FORWARD rules above, otherwise they'll get the packet first
and just pass it anyway.
> $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
> $IPTABLES -A INPUT -s 192.168.0.0/24 -i eth0 -j DROP
Actually, just go find a DECENT fw script and use that ;).
HTH,
-Ath
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-01-29 5:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-28 22:29 Should i be worried? Erik Ahlner
2003-01-28 23:24 ` Athan
2003-01-29 1:17 ` Arnt Karlsen
-- strict thread matches above, loose matches on Subject: below --
2003-01-28 23:30 Preston Wade
2003-01-29 0:45 ` Erik Ahlner
2003-01-29 5:11 Preston Wade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox