NFS and iptables
21 January 2008Trying to share a folder on my fedora box with my new ubuntu box, couldn’t figure out why it wasn’t able to connect, until I remember good ole iptables (sigh). And the issue is complicated by the fact that nfs seems to start its various services on random ports (sigh)… still I found a good post here which got me through it.
cat >> /etc/sysconfig/nfs LOCKD_TCPPORT=48620 LOCKD_UDPPORT=48620 MOUNTD_PORT=48621 STATD_PORT=48622 RQUOTAD=no RQUOTAD_PORT=48623 ^D
then put together a little script to allow the requisite ports to be opened via iptables
cat > ~/iptable-allow.sh #!/bin/bash for i in 111 2049 48620 48621 48622 48623 do iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport $i -j ACCEPT iptables -I INPUT -m state --state NEW -m udp -p udp --dport $i -j ACCEPT done ^D
then a quick
chmod +x ~/iptable-allow.sh ~/iptable-allow.sh
and I was in business
Archived in filesystem, iptables, share, network, nfs, linux |
Trackback | del.icio.us
| Top Of Page