Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CentOS 6.2 (LiveCD Graphical install) Tinker machine PG
- /etc/sysconfig/iptables
- # Firewall configuration written by system-config-firewall
- # Manual customization of this file is not recommended.
- *filter
- :INPUT ACCEPT [0:0]
- :FORWARD ACCEPT [0:0]
- :OUTPUT ACCEPT [0:0]
- -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
- -A INPUT -p icmp -j ACCEPT
- -A INPUT -i lo -j ACCEPT
- -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
- #manual nfs entries
- # the term "RH-Firewall-1-INPUT" did not work, I changed it to "INPUT" and that fixed it.
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p udp --dport 111 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p tcp --dport 111 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p udp --dport 2049 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p tcp --dport 32803 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p udp --dport 32769 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p tcp --dport 892 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p udp --dport 892 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p tcp --dport 875 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p udp --dport 875 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p tcp --dport 662 -j ACCEPT
- -A INPUT -s 192.168.0.0/24 -m state --state NEW -p udp --dport 662 -j ACCEPT
- #manual nfs entries end
- -A INPUT -j REJECT --reject-with icmp-host-prohibited
- -A FORWARD -j REJECT --reject-with icmp-host-prohibited
- COMMIT
- #ref:
- # http://www.cyberciti.biz/faq/centos-fedora-rhel-iptables-open-nfs-server-ports/
- # http://pario.no/2008/01/15/allow-nfs-through-iptables-on-a-redhat-system/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement