Thursday, September 18, 2014

Running NFS server behind firewall.

All time appear new oportunities which required flexible and a large commitment. This article show you how to run NFS server behind firewall. In my scenario firewall is on the same server as NFS service.

Check if firewall is running:

service iptables status

You should see firewall status and listing of rules if any exist ;-)
Now time for add new rules into firewall configuration:

from commandline typ:
iptables -I INPUT -m state --state NEW,ESTABLISHED -p tcp -m multiport --dport 111,892,2049,32803 -j ACCEPT  

iptables -I INPUT -m state --state NEW,ESTABLISHED -p udp -m multiport --dport 111,892,2049,32769 -j ACCEPT

The last move is save rules which are now in memory into configuration file. This step must be perform if you want to save rules permanently. Please remember about it always in case of using iptables command in CMD.

service iptables save

There should also see "ensurance" that files /etc/sysconfig/iptables-config has been overwritten.Now you can check if your nfs server is available over network. You can use mount -e command.



No comments:

Post a Comment