SysAdmin

IPTABLES rules to enable NFS share on a Redhat based Server.

JJ
Jobin Joseph · Founder and CEO
·Published 9 May 2012·1 min read

Add the following rules to /etc/sysconfig/iptables with your favourite text editor.
“`



-A RH-Firewall-1-INPUT -m state –state NEW -p udp –dport 111 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p tcp –dport 111 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p udp –dport 892 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p tcp –dport 892 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p udp –dport 875 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p tcp –dport 875 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p udp –dport 662 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p tcp –dport 662 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p tcp –dport 2049 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p tcp –dport 32803 -j ACCEPT


-A RH-Firewall-1-INPUT -m state –state NEW -p udp –dport 32769 -j ACCEPT

“`

Now restart the iptables service
“`



/etc/init.d/iptables restart“`

Now access the share from Client system.

Jobin Joseph
Jobin Joseph, Founder and CEO
5x AWS Certified, ISO 27001:2022 Lead Implementer, 17+ years building cloud infrastructure for regulated industries.
About Jobin →

Reading this because your AWS bill or uptime is a problem?

30 minutes, direct with the founder, no sales pitch: one specific recommendation for your AWS workload.

Book a free 30-minute review
30 min Free Consultation →