I have added a nic to my system and I am trying to use my freebsd 12.1 box as a gateway complete with dhcp and dns. I enabled the gateway in /etc/rc as per handbook, but I'm not able to ping my ISP router through the gateway. Any help is appreciated.
The configuration is as follows:
ISP Router (192.168.1.254) connected to internet.
Freebsd 12.1 Machine:
nic 1 - ue0, 192.168.1.1 (connected to isp router's on 192.168.1.254)
nic 2 - em0, 192.168.55.1 (connected to switch in home office)
Macpro running Mojave:
en0, 192.168.55.31 (dhcp, connected to switch in home office, default gateway is 192.168.55.1)
On Freebsd:
/etc/rc.conf
Ping the ISP router:
Ping the gateway:
Display the routing table:
Everything looks good to me from the freebsd side, now for the mac...
On Mac:
Ping the gateway:
Ping the ISP router:
Hmm... that's odd...
Trace the route to the gateway:
Trace the route to the ISP router:
So, what's up. Did I miss a configuration setting?
The configuration is as follows:
ISP Router (192.168.1.254) connected to internet.
Freebsd 12.1 Machine:
nic 1 - ue0, 192.168.1.1 (connected to isp router's on 192.168.1.254)
nic 2 - em0, 192.168.55.1 (connected to switch in home office)
Macpro running Mojave:
en0, 192.168.55.31 (dhcp, connected to switch in home office, default gateway is 192.168.55.1)
On Freebsd:
/etc/rc.conf
Code:
ifconfig_ue0="inet 192.168.1.1/24"
ifconfig_em0="inet 192.168.55.1/24"
defaultrouter="192.168.1.254"
gateway_enable="YES"
Ping the ISP router:
Code:
ping 192.168.1.254
PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: icmp_seq=0 ttl=64 time=0.960 ms
Code:
ping 192.168.55.1
PING 192.168.55.1 (192.168.55.1): 56 data bytes
64 bytes from 192.168.55.1: icmp_seq=0 ttl=64 time=0.049 ms
Display the routing table:
Code:
netstat -r
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 192.168.1.254 UGS ue0
localhost link#2 UH lo0
192.168.1.0/24 link#3 U ue0
192.168.1.1 link#3 UHS lo0
192.168.55.0/24 link#1 U em0
192.168.55.1 link#1 UHS lo0
Everything looks good to me from the freebsd side, now for the mac...
On Mac:
Ping the gateway:
Code:
ping 192.168.55.1
PING 192.168.55.1 (192.168.55.1): 56 data bytes
64 bytes from 192.168.55.1: icmp_seq=0 ttl=64 time=0.255 ms
Ping the ISP router:
Code:
ping 192.168.1.254
PING 192.168.1.254 (192.168.1.254): 56 data bytes
Request timeout for icmp_seq 0
...
Hmm... that's odd...
Trace the route to the gateway:
Code:
traceroute 192.168.55.1
traceroute to 192.168.55.1 (192.168.55.1), 64 hops max, 52 byte packets
1 192.168.55.1 (192.168.55.1) 0.586 ms 0.277 ms 0.288 ms
Trace the route to the ISP router:
Code:
traceroute 192.168.1.254
traceroute to 192.168.1.254 (192.168.1.254), 64 hops max, 52 byte packets
1 192.168.55.1 (192.168.55.1) 0.542 ms 0.280 ms 0.281 ms
2 * *
So, what's up. Did I miss a configuration setting?