Click to See Complete Forum and Search --> : Closing ports on a FreeBSD Server


raz0rblade
09-03-2003, 09:17 PM
I'm trying to secure my FreeBSD powered home server. What do I shutdown to close these ports ?


111/tcp open sunrpc
587/tcp open submission
1023/tcp open netvenuechat

Alex Cavnar, aka alc6379
09-04-2003, 12:10 AM
Check out this link in the FreeBSD handbook:

http://www.freebsd.org/doc/handbook/firewalls.html

Basically, there are about 3 steps you'd need to do:

1. Rebuild your kernel with IPFIREWALL support.
2. Reboot with your new kernel.
3. Write your firewall rules with the ipfw tool.

If you're familiar with iptables or ipchains in Linux, ipfw shouldn't be that difficult to learn. You basically just have to write rules to close all of the ports. Really, you could close all three ports in just one rule.

raz0rblade
09-04-2003, 06:03 PM
Ok, thanks. Will try that :)
But what are these ports really used for ? I dont trust the nmap description. They have reported incorrectly before.

Edit: Quick question, this rule would block those three ports correct ?

ipfw add deny tcp from any to any 111,587,1023

Alex Cavnar, aka alc6379
09-04-2003, 11:29 PM
I think that firewall rule should work. I believe I actually used a similar rule to block those same ports.

The only one I'm familiar with is the portmapper port. If you run any Remote Procedure Call based services, you'd need it running. For instance, you have to have it for NFS. But for the others, I'd try asking in the Networking Forum...