Hello, this is my first post because I just installed FreeBSD to replace Linux on my local server... just wanna try something new. Until now I'm happy with FreeBSD but now I'm stucking in a routing problem.
The constelation is as follows:
FreeBSD Server has two interfaces, re0 192.168.4.30 for LAN 192.168.4.0/24
wlan1 192.168.44.188 for 192.168.44.0/24
The LAN is provided by a DHCP Service from a FritzBox router where every host in LAN (the FreeBSD Server too) is connected to.
So, my whish is to send packages from every host in 192.168.0.4/24 to hosts in 192.168.44.0/24 over the BSD Server.
FritzBox is configured for routing every package adressed to 192.168.44.0/24 over the FreeBSD Server as gateway.
For example the way it should work:
HostA ----------------> FritzBox ------------------> FreeBSD -------------- WLAN --------> HostB
192.168.4.28 ------------------------ 192.168.4.30, 192.168.44.188 ----------------192.168.44.187
The Routing table in FreeBSD looks like this:
That looks good in my opinion. 192.168.44.0/24 is available over wlan1.
So it is possible to ping the WLAN host on the other side:
But if I try to ping from HostA it is not possible to reach the other side:
But as you can see, the routing table in the FritzBox tells that the next hop is the FreeBSD interface. So my suggestion is that the routing in FreeBSD server is not correct. But why?
I enable the forwarding:
But still not possible to ping from local LAN to remote network over WLAN... Can you provide some help?
Thanks!
The constelation is as follows:
FreeBSD Server has two interfaces, re0 192.168.4.30 for LAN 192.168.4.0/24
wlan1 192.168.44.188 for 192.168.44.0/24
The LAN is provided by a DHCP Service from a FritzBox router where every host in LAN (the FreeBSD Server too) is connected to.
So, my whish is to send packages from every host in 192.168.0.4/24 to hosts in 192.168.44.0/24 over the BSD Server.
FritzBox is configured for routing every package adressed to 192.168.44.0/24 over the FreeBSD Server as gateway.
For example the way it should work:
HostA ----------------> FritzBox ------------------> FreeBSD -------------- WLAN --------> HostB
192.168.4.28 ------------------------ 192.168.4.30, 192.168.44.188 ----------------192.168.44.187
The Routing table in FreeBSD looks like this:
Code:
bsd# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 192.168.4.1 UGS re0
127.0.0.1 link#2 UH lo0
192.168.4.0/24 link#1 U re0
192.168.4.30 link#1 UHS lo0
192.168.44.0/24 link#4 U wlan1
192.168.44.188 link#4 UHS lo0
So it is possible to ping the WLAN host on the other side:
Code:
bsd# ping 192.168.44.187
PING 192.168.44.187 (192.168.44.187): 56 data bytes
64 bytes from 192.168.44.187: icmp_seq=0 ttl=64 time=4.555 ms
64 bytes from 192.168.44.187: icmp_seq=1 ttl=64 time=0.740 ms
...
But if I try to ping from HostA it is not possible to reach the other side:
Code:
# ping 192.168.44.187
PING 192.168.44.187 (192.168.44.187) 56(84) bytes of data.
From 192.168.4.1: icmp_seq=1 Redirect Host(New nexthop: 192.168.4.30)
^C
--- 192.168.44.187 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4000ms
But as you can see, the routing table in the FritzBox tells that the next hop is the FreeBSD interface. So my suggestion is that the routing in FreeBSD server is not correct. But why?
I enable the forwarding:
Code:
bsd# sysctl -a |grep forwarding
net.inet.ip.forwarding: 1
Thanks!