Rejecting udp
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECT
Whats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Regards Klintan
Quoted 5 lines · Michael K
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
REJECT is "return some ICMP code saying 'no go'" usually something
like 'port unreachable'.
DROP is "just forget about this packet, send nothing back to the
source".
Thus the difference has nothing to do with connectionful vs.
connectionless.
-Ath
Signature · 4 lines
- 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 - MEOn Mon, 3 Mar 2003 17:38:06 +0000,
Athan <[email protected]> wrote in message
<[email protected]>:
Quoted 12 lines · Michael K
Quoted 6 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
REJECT is "return some ICMP code saying 'no go'" usually something like 'port unreachable'.
DROP is "just forget about this packet, send nothing back to the source".
...the latter is appropriate for your external interface to evade scriptkiddies looking for easy enough prey, while you may prefer the former for your internal lan wintendo users, to help them avoid stalling their wintendos on trying to share files.
Quoted 4 lines
Thus the difference has nothing to do with connectionful vs. connectionless.
-Ath
Signature · 4 lines
..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.
----- Original Message -----
From: "Michael K" <[email protected]>
To: <[email protected]>
Sent: Monday, March 03, 2003 6:28 PM
Subject: Rejecting udp
Quoted 8 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Regards Klintan
First of all: This has little to do with TCP or UDP (or connection-less stuff).
Many firewalls have a policy to drop packets coming from the outside when nothing on the inside has started communicating to the internet (outside). But, port 137 is part of the SMB (filesharing) protocol. It starts inside your network, broadcasting that services are available. The firewall will see this as legitimate traffic, since it started on the inside. If you wouldn't block port 137, you'd be broadcasting to the internet that you have filesharing enabled on your network, thereby opening up port 137 to the internet, as the firewall sees no danger.
The next step for a cracker would be easy, get into your filesharing network, steal passwords or worse...
Simply: Things that "You Don't Want to Happen" (TM).
Short answer: You do want to filter port 137 (and 138/139).
A good approach is to block all traffic to the firewall/internet from the inside, then open op ports (POP, SMTP, HTTP and other services) as needed, but no more then what's needed.
HTH,
Willem
I am trying to remember my networking class.... I think that the original question is a good question. UDP packets (legitimately) arriving at my computer are not acknowledged. That is, I don't tell the sender "Yeah, I got that packet. Thanks." Nor, do I tell the sender "Whoops. I didn't quite get all of that last packet. Could you send it again?" So, REJECTing a UDP packet doesn't make sense. The sender isn't looking for any type of OK message or anything for that matter. In fact, where would the REJECT message go? Does the sender even have a listen port open?
But then again, I could be completely wrong.
Regards,
Skip
Quoted 41 lines
----- Original Message -----
From: "Michael K" <[email protected]>
To: <[email protected]>
Sent: Monday, March 03, 2003 6:28 PM
Subject: Rejecting udpQuoted 9 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Regards Klintan
First of all: This has little to do with TCP or UDP (or connection-less stuff).
Many firewalls have a policy to drop packets coming from the outside when nothing on the inside has started communicating to the internet (outside). But, port 137 is part of the SMB (filesharing) protocol. It starts inside your network, broadcasting that services are available. The firewall will see this as legitimate traffic, since it started on the inside.
If you wouldn't block port 137, you'd be broadcasting to the internet that you have filesharing enabled on your network, thereby opening up port 137 to the internet, as the firewall sees no danger. The next step for a cracker would be easy, get into your filesharing network, steal passwords or worse...
Simply: Things that "You Don't Want to Happen" (TM).Short answer: You do want to filter port 137 (and 138/139).
A good approach is to block all traffic to the firewall/internet from the inside, then open op ports (POP, SMTP, HTTP and other services) as needed, but no more then what's needed.
HTH,
Willem
I am trying to remember my networking class (/me shakes the cobwebs out)
I think that the original question is a good question. UDP packets (legitimately) arriving at my computer are not acknowledged. That is, I don't tell the sender "Yeah, I got that packet. Thanks." Nor, do I tell the sender "Whoops. I didn't quite get all of that last packet. Could you send it again?" So, REJECTing a UDP packet doesn't make sense. The sender isn't looking for any type of OK message or anything for that matter. In fact, where would the REJECT message go? Does the sender even have a listen port open?
But then again, I could be completely wrong.
Regards,
Skip
Quoted 41 lines
----- Original Message -----
From: "Michael K" <[email protected]>
To: <[email protected]>
Sent: Monday, March 03, 2003 6:28 PM
Subject: Rejecting udpQuoted 9 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Regards Klintan
First of all: This has little to do with TCP or UDP (or connection-less stuff).
Many firewalls have a policy to drop packets coming from the outside when nothing on the inside has started communicating to the internet (outside). But, port 137 is part of the SMB (filesharing) protocol. It starts inside your network, broadcasting that services are available. The firewall will see this as legitimate traffic, since it started on the inside.
If you wouldn't block port 137, you'd be broadcasting to the internet that you have filesharing enabled on your network, thereby opening up port 137 to the internet, as the firewall sees no danger. The next step for a cracker would be easy, get into your filesharing network, steal passwords or worse...
Simply: Things that "You Don't Want to Happen" (TM).Short answer: You do want to filter port 137 (and 138/139).
A good approach is to block all traffic to the firewall/internet from the inside, then open op ports (POP, SMTP, HTTP and other services) as needed, but no more then what's needed.
HTH,
Willem
I suppose being able to reject UDP packets is just allowing you to control access to a service that may be listening on that UDP port. For example blocking the nimba virus by rejecting UDP port 137,138,139.
Quoted 59 lines · Skip Morrow
I am trying to remember my networking class (/me shakes the cobwebs out)
I think that the original question is a good question. UDP packets (legitimately) arriving at my computer are not acknowledged. That is, I don't tell the sender "Yeah, I got that packet. Thanks." Nor, do I tell the sender "Whoops. I didn't quite get all of that last packet. Could you send it again?" So, REJECTing a UDP packet doesn't make sense. The sender isn't looking for any type of OK message or anything for that matter. In fact, where would the REJECT message go? Does the sender even have a listen port open?
But then again, I could be completely wrong.
Regards,
SkipQuoted 41 lines
----- Original Message -----
From: "Michael K" <[email protected]>
To: <[email protected]>
Sent: Monday, March 03, 2003 6:28 PM
Subject: Rejecting udpQuoted 9 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Regards Klintan
First of all: This has little to do with TCP or UDP (or connection-less stuff).
Many firewalls have a policy to drop packets coming from the outside when nothing on the inside has started communicating to the internet (outside). But, port 137 is part of the SMB (filesharing) protocol. It starts inside your network, broadcasting that services are available. The firewall will see this as legitimate traffic, since it started on the inside.
If you wouldn't block port 137, you'd be broadcasting to the internet that you have filesharing enabled on your network, thereby opening up port 137 to the internet, as the firewall sees no danger. The next step for a cracker would be easy, get into your filesharing network, steal passwords or worse...
Simply: Things that "You Don't Want to Happen" (TM).Short answer: You do want to filter port 137 (and 138/139).
A good approach is to block all traffic to the firewall/internet from the inside, then open op ports (POP, SMTP, HTTP and other services) as needed, but no more then what's needed.
HTH,
Willem
I agree that it is important to block certain UDP ports/traffic. What the issue is, is what is the purpose of REJECTing a UDP packet versus DROPping the UDP packet? My point is, sending back a REJECT message doesn't make sense with UDP.
Skip
Quoted 66 lines
I suppose being able to reject UDP packets is just allowing you to control access to a service that may be listening on that UDP port. For example blocking the nimba virus by rejecting UDP port 137,138,139.
Quoted 47 lines · Skip Morrow
I am trying to remember my networking class (/me shakes the cobwebs out)
I think that the original question is a good question. UDP packets (legitimately) arriving at my computer are not acknowledged. That is, I don't tell the sender "Yeah, I got that packet. Thanks." Nor, do I tell the sender "Whoops. I didn't quite get all of that last packet. Could you send it again?" So, REJECTing a UDP packet doesn't make sense. The sender isn't looking for any type of OK message or anything for that matter. In fact, where would the REJECT message go?
Does the sender even have a listen port open?But then again, I could be completely wrong.
Regards,
SkipQuoted 11 lines
----- Original Message -----
From: "Michael K" <[email protected]>
To: <[email protected]>
Sent: Monday, March 03, 2003 6:28 PM
Subject: Rejecting udpQuoted 4 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp
connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Quoted 5 lines
Quoted 3 lines
Regards Klintan
First of all: This has little to do with TCP or UDP (or
connection-less stuff).
Quoted 2 lines
Many firewalls have a policy to drop packets coming from the outside
when nothing on the inside has started communicating to the internet (outside). But, port 137 is part of the SMB (filesharing) protocol. It starts inside your network, broadcasting that services are available. The firewall will see this as legitimate traffic, since it started on the inside.
Quoted 1 line
If you wouldn't block port 137, you'd be broadcasting to the
internet that you have filesharing enabled on your network, thereby opening up port 137 to the internet, as the firewall sees no danger.
Quoted 1 line
The next step for a cracker would be easy, get into your filesharing
Quoted 13 lines
network, steal passwords or worse...
Quoted 5 lines
Simply: Things that "You Don't Want to Happen" (TM).
Short answer: You do want to filter port 137 (and 138/139).
A good approach is to block all traffic to the firewall/internet
from the inside, then open op ports (POP, SMTP, HTTP and other services) as needed, but no more then what's needed.
Quoted 3 lines
HTH,
Willem--
On Tue, 4 Mar 2003 08:31:34 -0500 (EST),
"Skip Morrow" <[email protected]> wrote in message <[email protected]>:
Quoted 4 lines
I agree that it is important to block certain UDP ports/traffic. What the issue is, is what is the purpose of REJECTing a UDP packet versus DROPping the UDP packet? My point is, sending back a REJECT message doesn't make sense with UDP.
..I agree. In my response to Athan, I was thinking tcp. And for testing, and developing sniffers, you sniff everywhere anyway.
Signature · 4 lines
..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.
Quoted 4 lines
Quoted 4 lines
I agree that it is important to block certain UDP ports/traffic. What the issue is, is what is the purpose of REJECTing a UDP packet versus DROPping the UDP packet? My point is, sending back a REJECT message doesn't make sense with UDP.
Why not? RFCs say that a closed UDP port should elicit icmp dest.unreach./port unreach.
So it does make sens to be in conformance with the standards.
That is how portscanners see if a port is closed or not. If you drop the packets, it may mean that the port is either open or is filtered.
Regards,
Maciej
Quoted 9 lines
I am trying to remember my networking class.... I think that the original question is a good question. UDP packets (legitimately) arriving at my computer are not acknowledged. That is, I don't tell the sender "Yeah, I got that packet. Thanks." Nor, do I tell the sender "Whoops. I didn't quite get all of that last packet. Could you send it again?" So, REJECTing a UDP packet doesn't make sense. The sender isn't looking for any type of OK message or anything for that matter. In fact, where would the REJECT message go? Does the sender even have a listen port open?
Quoted 5 lines
But then again, I could be completely wrong.
Regards,
Skip
The normal thing to do would be to DROP unwanted UDP, however it is possible to use a --reject-with and return an ICMP with "port unreachable"
or "host unreachable" or similar if you want.
Mike
Quoted 47 lines
Quoted 42 lines
----- Original Message -----
From: "Michael K" <[email protected]>
To: <[email protected]>
Sent: Monday, March 03, 2003 6:28 PM
Subject: Rejecting udpQuoted 9 lines
I saw this rule someware on the net.
$IPTABLES -A FORWARD -o $EXTERNALIF -p udp --dport 137 -j REJECTWhats the use to use reject on a UDP packet? Isn't udp connection-less A more correct shouldn't that be "-j DROP"? Or am I thinking wrong here?
Regards Klintan
First of all: This has little to do with TCP or UDP (or connection-less stuff).
Many firewalls have a policy to drop packets coming from the outside when nothing on the inside has started communicating to the internet (outside). But, port 137 is part of the SMB (filesharing) protocol. It starts inside your network, broadcasting that services are available. The firewall will see this as legitimate traffic, since it started on the inside.
If you wouldn't block port 137, you'd be broadcasting to the internet that you have filesharing enabled on your network, thereby opening up port 137 to the internet, as the firewall sees no danger. The next step for a cracker would be easy, get into your filesharing network, steal passwords or worse...
Simply: Things that "You Don't Want to Happen" (TM).Short answer: You do want to filter port 137 (and 138/139).
A good approach is to block all traffic to the firewall/internet from the inside, then open op ports (POP, SMTP, HTTP and other services) as needed, but no more then what's needed.
HTH,
Willem
Quoted 11 lines · Skip Morrow, on Tuesday, Mar 4 2003 at 12:00, wrote:
I am trying to remember my networking class (/me shakes the cobwebs out)
I think that the original question is a good question. UDP packets (legitimately) arriving at my computer are not acknowledged. That is, I don't tell the sender "Yeah, I got that packet. Thanks." Nor, do I tell the sender "Whoops. I didn't quite get all of that last packet. Could you send it again?" So, REJECTing a UDP packet doesn't make sense. The sender isn't looking for any type of OK message or anything for that matter. In fact, where would the REJECT message go? Does the sender even have a listen port open?
Quoted 1 line
But then again, I could be completely wrong.
Maybe. UDP connectionless means any protocol lying on top should implement their own connection tracking mechanism if it wants one, tftp is an example that comes to my mind (http://www.ietf.org/rfc/rfc1350.txt
if you are curious).
I don't knwon the SMB internals, but it's wise to reject a blocked port from inside your lan instead of let any timeouts expire, as someone noted.
Manuel