In article <(E-Mail Removed)>, buck says...
>
>On Thu, 18 Nov 2004 00:46:39 +0000 (UTC), Robert Nichols
><(E-Mail Removed)> wrote:
>
>>In article <(E-Mail Removed)> ,
>>Allan <(E-Mail Removed)> wrote:
>>:Hi,
>>:
>>:I'm tring to build iptables on my Mandrake 10.0,kernel 2.4.27
>>:
>>:If rule:
>>:
>>:iptables -A INPUT -p udp -j DROP
>>:
>>:was issued,
>
>>:Could somebody tell me which udp port should be open so that I can use
>>::nslookup?
>>
>>Just be sure that you have a rule
>>
>> -m state --state RELATED,ESTABLISHED -j ACCEPT
>>
>>_before_ your DROP rule.
>
>Robert told you what to do. I'm teaching you to fish :-).
>iptables -A INPUT -p udp -j LOG
>iptables -A INPUT -p udp -j DROP
>
>Run your nslookup
>
>iptables -D INPUT -p udp -j LOG
>
>Check your logs - probably messages. You'll find the port(s) that
>need(s) to be open there.
>
>/etc/services has a list of ports. You'll find that 43 is whois,
>which is what nslookup uses.
>
>You may also find that DNS lookups fail because they're on UDP 53.
>
Teaching someone to fish is fine, but unless someone shows him how
to clean and cook that fish, he's still going to go hungry. ;-)
Unless the OP is trying to run a _server_ for those services, your
suggestion to open specific ports is the wrong approach. The whole
point of a stateful firewall is that reply packets can be allowed
to pass without leaving ports open. That's what the my suggested
rule accomplishes -- if the DNS query is allowed to pass through the
OUTPUT chain, then the reply to that query will be allowed through
the INPUT chain since it is RELATED traffic.
There's an excellent iptables tutorial by Oskar Andreasson available
from frozentux.net :
http://iptables-tutorial.frozentux.net/
You can read it online in HTML form, or download the complete
PostScript document.
--
Bob Nichols AT comcast.net I am "rnichols42"