tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Policy-based routing with ipf



I need to implement policy-based routing with ipf and I'm struggling to parse ipf.conf(5). I have a NetBSD host directly connected to two LANs (with forwarding enabled). I also have another box directly connected to same LANs with forwarding enabled which, for tedious reasons (to do with transparent web filtering), is set as the default gateway on the clients.

  10.3.0.1 <-> NetBSD <-> 192.168.102.1
10.3.0.254 <-> filter <-> 192.168.102.254

A client on the 192.168.102.x range can connect to things on 10.3.0.x range in general. However, it cannot connect to the NetBSD box as the packet is coming in on the wrong interface and the routing table sends it back on the direct interface (i.e. 192.168.102.10 reaches 10.3.0.1 via 10.3.0.254, but the NetBSD box replies from 192.168.102.1).

The NetBSD box is doing DHCP on both interfaces. dhcpd does not seem to support specifying additional static routes.

My plan is to use policy-based routing to direct matched traffic back to 192.168.102.x via 10.3.0.254 (e.g. http or smb). I cannot work out how to achieve this from the man page though.

Any hints?

--
Stephen



Home | Main Index | Thread Index | Old Index