Hi Newsman,
you wrote:
> I thought NFS used port 2049. But I've stumbled onto something that
> seems strange to me---I'm a network novice.
A Sun RPC-Service can be bound to any port dynamicly. However they often
prefer one and some implementations might rely on a fixed port being
available. For NFSv2 this is the port 2049 as you noticed.
> Timed out" message when I tried to connect from YDL using NFS v3. I
> experimented a bit and found that I could connect by commenting out the
> following 2 lines in /etc/sysconfig/iptables:
>
> -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 --syn -j REJECT
> -A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
>
> The strange thing is that NFS works even though the next two lines are
> still in /etc/sysconfig/iptables:
>
> -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 --syn -j REJECT
> -A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
NFSv3 registered on another port. See the output of "rpcinfo -p
hostname".
> Is my confusion warranted, or am I missing something? And am I correct
> in thinking that I have greatly compromised security by commenting out
> the lines having to do with ports 0:1023?
Yes, it is quite generic. You might want to limit the permission UDP
port 111 (portmapper) and maybe other RPC services needed by NFS
registering in the port range. Since the port assignment is mostly
reproducable over multiple system starts you can use the port numbers
reported by rpcinfo for the rules. Just keep in mind that the port
numbers may change.
Furthermore it might be a wise choice to limit the access to a certain
range of IP numbers. The RPC services had and still may have various
vulnerabilities beside the general information leakage by the
portmapper.
Michael
--
Linux@TekXpress
http://www-users.rwth-aachen.de/Mich...kxp/tekxp.html