Y
Ytachi1000
Guest
Hello I'm new on freebsd, and I have a server and I use ipfw and i just want only some ports to be opened, and all remains to be closed.
So I want ONLY this ports: 24000, 24001 24002 24003, 11002 to be opened for everyone. But i just dont know how to customize the ipfw.rules file
I tryed meny options , but in all cases ipfw block any conection, i cant costumized, or well, i just dont know how to customized to have only thats ports open for everyone.
And Those 2 ports: ssh 22, and 3306 mysql,and anyports from server I want to be the only one to acces them,from another work place(other internet).
Only option i found to work that allowed conection in ipfw is:
But as I said, I just want to know how to let only that 5 Ports Opened and the rest to be all used only by me.
I tryed to use pf.conf too , i just want a protection for the server but i dont know exacly what can i use exacly.
I want ipfw or pf protection to make this work I dont know exacly how to do this...
Now i have pf and ipfw servies started, but i want to customized them as i said.
So if you can give me some advices i will be more then gratefull thanks.
So I want ONLY this ports: 24000, 24001 24002 24003, 11002 to be opened for everyone. But i just dont know how to customize the ipfw.rules file
I tryed meny options , but in all cases ipfw block any conection, i cant costumized, or well, i just dont know how to customized to have only thats ports open for everyone.
And Those 2 ports: ssh 22, and 3306 mysql,and anyports from server I want to be the only one to acces them,from another work place(other internet).
Only option i found to work that allowed conection in ipfw is:
Code:
#!/bin/sh
ipfw -q -f flush
cmd="ipfw add"
inter="msk0"
#Allow any conection
$cmd 0001 allow ip from any to any out
$cmd 0002 allow ip from any to any in
But as I said, I just want to know how to let only that 5 Ports Opened and the rest to be all used only by me.
I tryed to use pf.conf too , i just want a protection for the server but i dont know exacly what can i use exacly.
I want ipfw or pf protection to make this work I dont know exacly how to do this...
Now i have pf and ipfw servies started, but i want to customized them as i said.
So if you can give me some advices i will be more then gratefull thanks.