Tuesday, November 5, 2013

How to disable or enable a network port.

www.unixbabuforum.inhow can I open or disable a particular port for a particular 
interface on my solaris box. I've two interface e1000g0 and e1000g1. For 
example I want to block port number 1234 for: 
1- both interface 
2- only one interface. 

www.unixbabuforum.inipf -f - 
block in quick from any to any port = 1234 


ipf -f - 
block in quick on e1000g0 from any to any port = 1234 

Those will block until next reboot. To make the ipf rules permanent place 
them in /etc/ipf/ipf.conf 

This assumes you are on solaris 10, and you might have to enable the 
ipfilter service if it's not already enabled. 

www.unixbabuforum.inAfter doing change in /etc/ipf/ipf.conf you can restart service of ip 
filter instead of restarting server. 

www.unixbabuforum.inDisable(shutdown/stop) relative service 
or use firewall ....


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM