Wednesday, March 30, 2011

ypserv picks up random port which a pain when configuring your iptables

To configure NIS static port, add the following line in your /etc/sysconfig/network

YPSERV_ARGS=”-p 834″ YPXFRD_ARGS=”-p 835″

Then add iptables rules
 
#NIS
iptables -A custom-fw-input -p tcp --dport 834 -j ACCEPT
iptables -A custom-fw-input -p udp --dport 834 -j ACCEPT
iptables -A custom-fw-input -p tcp --dport 835 -j ACCEPT
iptables -A custom-fw-input -p udp --dport 835 -j ACCEPT



ref:http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-server-nis-ports.html

No comments:

Post a Comment