S
S
Sergey2015-03-12 09:35:21
FreeBSD
Sergey, 2015-03-12 09:35:21

How to properly configure ipfw for a web server?

There is a simple web server that hosts 10-20 domains, you need a simple and correct ipfw!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
ShamblerR, 2015-03-12
@ShamblerR

Well, judging by your not very detailed question, I give a not very
detailed
answer .

M
Magi, 2015-04-20
@Magi

There was a similar problem, only for a home web server on FreeBSD 10.1
Here are my rules, but after them freebsd cannot update ports, and joomla cannot find its updates and its plugins.
Tell me what's wrong?
# ipfw list
00015 reject log logamount 10000 tcp from any to any tcpflags syn,fin,ack,psh,rst,urg via ae0
00016 reject logamount 10000 tcp from any to any tcpflags !syn,!fin,!ack,!psh, !rst,!urg via ae0
00017 reject log logamount 10000 tcp from any to any not established tcpflags fin via ae0
00018 deny log logamount 10000 ip from any to any not verrevpath in via ae0
00050 allow ip from any to any via lo0
00055 allow ip from me to any
00075 allow tcp from any to any established
00100 allow icmp from any to any
00150 allow ip from 192.168.1.1 to me via ae0
00151 allow ip from 192.168.1.5 to me via ae0
00155 allow tcp from me to any keep-state
00170 allow tcp from any to me dst-port 20 ,21,22,25,53,80,110,143,443,587,993,995,3306,8080,10000,2812 via ae0
00171 allow udp from any to me dst-port 53,3306 via ae0
00250 allow icmp from any to any out via ae0 keep-state
00255 allow udp from me to any keep-state
00255 allow ip from any to any dst-port 123 out via ae0
00300 allow tcp from any to any dst-port 22 out via ae0 setup keep-state
00355 allow icmp from me to any keep-state
65535 deny ip from any to any

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question