LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Ipfw rule (https://www.linuxquestions.org/questions/%2Absd-17/ipfw-rule-57573/)

J_Szucs 04-30-2003 11:32 PM

Ipfw rule
 
Being a newbie to firewalls, I added a rule to ipfw ruleset, first just to measure dns traffic:

400 allow udp from xxx.xxx.x.xx 53 to any in via ed0

(the IP address is that of our IPS's primary dns server)

ipfw -a l, however showed no traffic for that rule, as if there were no udp packages coming in from our isp's dns server.

The server is an internet gateway configured according to the example described in the FreeBSD handbook to share one IP address for a whole LAN:
- NAT is enabled, and
- ipfw is in 'OPEN' mode.

Is it NAT that mangles things, or my rule is faulty?
Is it at all possible to apply more strict firewall rules when NAT is used on the same server?

J_Szucs 05-03-2003 08:29 PM

It turned out that our new ISP's dns servers do not work yet.
I did not realize this, because I was in the misbelief that we could not browse the net then.
So, being a newbie to firewalls, I blamed my ruleset for days before trying just to ping the servers.
By the way: how can we browse the net when all the dns servers given in resolv.conf are out of service?

As concerns the firewall, after some days of efforts reading through the freebsd, ipfw, nat manuals and google searching the web, I could somehow grasp how nat and ipfw work together.
It took quite long until I found it in the nat manual, that nat, being usually in front of the ruleset, does its job on the IP package, then gives it back to ipfw to check the remaining rules on the modified package.

Finding this in the manuals finally, I could setup our internet firewall on my own.
It works well, so am quite satisfied with it (default deny, just allowing in the services used, allowing everything out, making use of ipfw advance stateful conf).

Thank your for you attention, if any.


All times are GMT -5. The time now is 01:24 AM.