PDA

View Full Version : Web server and it's IPFW configs.


abarmot
November 17th, 2008, 16:30
Dear friends,
currently I am trying to learn a building web server (Apache, PHP, MySQL, etc.) with FreeBSD 7 and now my "topic" is IPFW.
Would you be so kind to post here your examples of IPFW configuration files suitable for web servers? :stud
Thanks for any help!

anomie
November 17th, 2008, 17:01
Have you read the handbook chapter on IPFW (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html)?

IPFW rulesets I've used have been adaptations of the example in 31.6.5.6.

komeylian
December 2nd, 2008, 10:19
hi, abarmot

if your web server should seen from internet you just need to do below:

ipfw add 1 allow tcp from any to me 80

sT4k3
December 2nd, 2008, 11:46
and if you use https than - ipfw add 2 allow ip from any to me 443

blackjack
December 2nd, 2008, 20:33
ipfw add 3 allow ip from <some ip> to me 22
ipfw add 4 deny ip from any to me

paulfrottawa
December 23rd, 2008, 15:34
I take it the "me" is the destination IP address of the server.

sT4k3
December 23rd, 2008, 18:07
if server have one ip address, then you can use "me"...

paulfrottawa
December 23rd, 2008, 23:51
The above example
ipfw add 1 allow tcp from any to me 80

What if "me" was on another computer or ip (like a jail). Me is for the router I'm guessing.

Right now I'm reading the hand book about the fire wall, and continually locking myself out setting up a firewall.

Thankfully I have a monitor and key board down there.

___________________________________--

Doing that I haven't had a chance to play with redirect but your short answer will get me going for the night thanks