On Sunday 16 November 2003 12:37, Amadeus wrote:

> So really they are the same for ipf, no? A request from the firewall and a
> request from the LAN, after NAT has worked it's magic...

For NATing on the EXT_IFACE, NAT is the last piece of code
that a packet encounter and it is here the magic occur viz. SNATing.

So ipf doesn't see the SNATed packets at all. It sees them only before
they get SNATed for outgoing and after they get SNATed for incoming packets

This is my perception. Corrections welcome.


> I want to allow the firewall to access port 80.
> I want to block the LAN from accessing port 80 (use the firewall's cache on
> port 3128 instead, which DOES need access to port 80).
> How can I accomplish this through ipnat and ipf?

put in ipnat.conf

rdr INT_IFACE 0/32 -> FIREWALL_IP port 3128 tcp

and configure the cache for interception caching/transparent proxying

For squid(squid-cache.org) put these into squid.conf

http_port 3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy  on
httpd_accel_uses_host_header on

> Ideally would be allow NAT for the network for only a handful of port
> numbers (25,110,21) and for the rest drop NAT so the packets wouldn't go
> anywhere (except requests TO the firewall IP (10.10.1.99) so it can access
> the cache and DNS server).

On the internal interface get ipf to "pass in quick keep state"
 for those you want to allow,
block everything else preferably with a return-icmp(filter-prohib).

Ram Chandar
--

Reply via email to