I want do configure my FreeBSD-System to use re0 as default gateway for all incoming/outgoing (internet) traffic and em0 for a specific network, so I can easily control packets with pf.
My router is a FritzBox (192.168.178.1) and both nics (re0 and em0) are connected to this. DHCP is currently enabled and they get ips in the same network.
Internet: Destination Gateway Flags Netif Expire default 192.168.178.1 UGS re0 127.0.0.1 link#3 UH lo0 192.168.178.0/24 link#1 U re0 192.168.178.33 link#2 UHS lo0 192.168.178.199 link#1 UHS lo0
default 192.168.178.1 UGS re0 192.168.178.0/24 link#2 U em0
- Default route
- IP no matter
- Routing to 192.168.178.0/24
- IP in network 192.168.178.0/24
defaultrouter="192.168.178.1" ifconfig_em0="inet 192.168.178.33 netmask 255.255.255.0" ifconfig_re0="inet 192.168.178.199 netmask 255.255.255.0" static_routes="my" route_my="-net 192.168.178.0/24 -iface em0"
It seems, re0 is always the first interface thats configured by OS and therefore the default gateway, including the route into my network 192.168.178.0/24.
Could anyone point me in the right direction? I don't want to use re0 for routing into my network. This should only done by em0.