Hello everyone.
I will try to explain my setup as clear as I can. I have a Windows 10 Workstation where I run a FreeBSD VM on VMWare 12.
This FreeBSD VM is meant to run multiple Apache/PHP/Wordpress instances on multiple jails.
The FreeBSD guest is bridged through the HOST Ethernet NIC, where the HOST has the IP 192.168.1.130 and the FreeBSD guest has the IP 192.168.1.100. So far all good.
The jail setup at the other hand is on subnet 10.1.0.0/24 with jail IP 10.1.0.1 and is an alias of the em0 interface to lo1 as virtual interface.
From within the jail I can ping the Windows host just fine, gateway and the whole 192.168.1.0/24 LAN network.
The problem I have is when I try to ping the FreeBSD jail from the HOST or from any devices connected to the 192.168.1.0/24 LAN.
My understanding is that I need to add a static route in order to have the FreeBSD jail resolved from the host, however I have been hammering my head badly for the past 4 hours since all I tried did not work.
Here's my FreeBSD (host) setup.
/etc/rc.conf
/etc/sysctl.conf
pf.conf
Additionally the gateway is a OpenWRT router.
I am happy to provide further information if needed. Any help will be gladly appreciated.
Regards
I will try to explain my setup as clear as I can. I have a Windows 10 Workstation where I run a FreeBSD VM on VMWare 12.
This FreeBSD VM is meant to run multiple Apache/PHP/Wordpress instances on multiple jails.
The FreeBSD guest is bridged through the HOST Ethernet NIC, where the HOST has the IP 192.168.1.130 and the FreeBSD guest has the IP 192.168.1.100. So far all good.
The jail setup at the other hand is on subnet 10.1.0.0/24 with jail IP 10.1.0.1 and is an alias of the em0 interface to lo1 as virtual interface.
From within the jail I can ping the Windows host just fine, gateway and the whole 192.168.1.0/24 LAN network.
The problem I have is when I try to ping the FreeBSD jail from the HOST or from any devices connected to the 192.168.1.0/24 LAN.
My understanding is that I need to add a static route in order to have the FreeBSD jail resolved from the host, however I have been hammering my head badly for the past 4 hours since all I tried did not work.
Here's my FreeBSD (host) setup.
/etc/rc.conf
Code:
ifconfig_em0="inet 192.168.1.100 netmask 255.255.255.0"
cloned_interfaces="lo1"
ifconfig_lo1_alias0="inet 10.1.0.1 netmask 255.255.255.0"
gateway_enable="YES"
pf_enable="YES"
defaultrouter="192.168.1.1"
/etc/sysctl.conf
Code:
security.jail.sysvipc_allowed=1
security.jail.allow_raw_sockets=1
net.inet.ip.forwarding=1
pf.conf
Code:
ext_if="em0"
jail_if="lo1"
IP_PUB="192.168.1.100"
IP_JAIL_bsdsrv1="10.1.0.1"
NET_JAIL="10.1.0.0/24"
scrub in all
# nat all jail traffic
nat pass on $ext_if from $NET_JAIL to any -> $IP_PUB
# allow ICMP ping
pass inet proto icmp from any to any
# passing all traffic
pass out
pass in
Additionally the gateway is a OpenWRT router.
I am happy to provide further information if needed. Any help will be gladly appreciated.
Regards