On 12/14/20 10:49 AM, Leslie Rhorer wrote:
> They will route from LAN A to LAN B through the router.
>
> Obviously I have to configure a specific route to LAN B on the gateway
> router, unless I employ NAT on the Linux box, so it could work that
> way,
ACK
I would add the route to LAN B via the Debian box and avoid NAT if I could.
> but the non-internet traffic between LAN A and LAN B is quite limited.
> Putting a specific route on those boxes is no big deal.
If you're using DHCP on LAN A, there is an option that you can add to
include the route to LAN B.
ISC DHCPd calls the options "cidr-static-route" and "ms-static-route".
I have the following configured:
subnet 192.0.2.0 netmask 255.255.255.0 {
...
option cidr-static-route 10, 100, 64, 192, 0, 2, 251, 0, 192, 0, 2, 254;
option ms-static-route 10, 100, 64, 192, 0, 2, 251, 0, 192, 0, 2, 254;
...
}
The format is a little odd, so refer to documentation. From memory,
it's one or more sets of three parts, <netmask>, <enough of the prefix
to cover the netmask>, <gateway IP>. E.e. 100.64(.0.0)/10 via 192.0.2.251.
The documentation I read suggested including a default gateway in the
*-static-route in case clients ignore the default gateway setting from
DHCP when a *-static-route is present. Hence (0)/0 via 192.0.2.254.
> That is the intent.
ACK
> Alternately, I could bridge LAN A and LAN B, rather than routing
> as separate subnets, or I could employ NAT. All three are viable
> solutions.
As stated above, I'd likely avoid NATing from LAN B to LAN A if I could.
I suspect I'd avoid bridging if there is no explicit need to bridge,
meaning all the traffic is capable of being routed.
> I just want to log the traffic details, including the time, date,
> and IP addresses.
There are multiple iptables targets that will accomplish this goal.
> Thanks!
You're welcome.