Article View: be.comp.security
Article #1755firewall with ipfw and natd
From: Ish
Date: Tue, 07 Aug 2001 08:17
Date: Tue, 07 Aug 2001 08:17
51 lines
2494 bytes
2494 bytes
hi,
I wrote some firewall-rules under FreeBSD 3.5.1 and most of them are quite
working...
Having a little local network (192.xxx.xxx.0), surfing tru my BSD with 2
nic's,
one connected to The Net (rl1), one to the local net (rl0).
LOCALNET ------> rl0 ------> rl1 -------> INTERNET
I'm quite newbie, so it's not very clear to me...
I'm using ipfw and natd, and somehow I got some questions I'd like an answer
for.
first rule in firewall_script:
ipfw add divert natd all from any to any via rl1
No problem here, I guess.
Just passes all the connections from the inside to the outside (and
backwards), right?
BUT:
ipfw add allow tcp from any to any 25
ipfw add allow tcp from any to any 110
Where in fact I would like to specify that only the local network can
send/get mail...
Supposing I could do it this way:
ipfw add allow tcp from 192.x.x.0/24 to any 25
ipfw add allow tcp from 192.x.x.0/24 to any 110
BUT that doesn't work... WHY?
Should I add divert/nat - rules?
Tnx,
IsH
----- less important (?) --------
What exactly is the use of the loopbackdevice?
What rules should I add for it?
ipfw add allow from any to any via lo0
--
* Life is like an Operating System.
* It's nice, but can be hard to cope with.
Technical Details
Message-ID:
<GuNb7.123$gX2.27571@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f922c,27de0af21f29d3af,start X-Google-Attributes: gidf922c,public X-Google-Thread: 113446,27de0af21f29d3af,start X-Google-Attributes: gid113446,public X-Google-Thread: 10eb3b,27de0af21f29d3af,start X-Google-Attributes: gid10eb3b,public X-Google-ArrivalTime: 2001-08-07 01:17:42 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: "Ish" <keeos@crosswinds_NOSPAM_.net> Newsgroups: be.comp.security,comp.security.firewalls,comp.unix.bsd.freebsd.misc Subject: firewall with ipfw and natd Lines: 53 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <GuNb7.123$gX2.27571@afrodite.telenet-ops.be> Date: Tue, 07 Aug 2001 08:17:42 GMT NNTP-Posting-Host: 213.224.41.72 X-Complaints-To: abuse@pandora.be X-Trace: afrodite.telenet-ops.be 997172262 213.224.41.72 (Tue, 07 Aug 2001 10:17:42 MET DST) NNTP-Posting-Date: Tue, 07 Aug 2001 10:17:42 MET DST Organization: Telenet Internet