I'm running vm-bhyve on freebsd11.1. one IP on igb0.
# ifconfig
# vi /etc/rc.conf
# vi /etc/sysctl.conf
# vi /home/ipfw/ipfw.rules
Host: 192.168.1.201
Bridge0: 192.168.8.1
Client: 192.168.8.202
And the client can't access outside network. and the redirect_port also did not work.
How can I fix this? Thanks for help!
# ifconfig
Code:
igb0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
ether 6c:ae:8b:60:07:ca
hwaddr 6c:ae:8b:60:07:ca
inet 192.168.1.201 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: vm-public
ether 02:62:3b:2e:55:00
inet 192.168.8.1 netmask 0xffffff00 broadcast 192.168.8.255
nd6 options=1<PERFORMNUD>
groups: bridge
id 00:00:00:00:00:00 priority 0 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0
member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 8 priority 128 path cost 2000000
member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 200000
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: vmnet-windows2008-0-public
options=80000<LINKSTATE>
ether 00:bd:f7:4b:f8:00
hwaddr 00:bd:f7:4b:f8:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: active
groups: tap
Opened by PID 1344
# vi /etc/rc.conf
Code:
ifconfig_igb0="inet 192.168.1.201 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
firewall_enable="YES"
firewall_type="open"
firewall_logging="YES"
firewall_script="/home/ipfw/ipfw.rules"
gateway_enable="YES"
firewall_nat_enable="YES"
firewall_nat_interface="igb0"
vm_enable="YES"
vm_dir="zfs:zroot/vm"
vm_list=""
vm_delay="10"
Code:
net.link.tap.up_on_open=1
net.inet.ip.fw.one_pass=0
net.inet.ip.fastforwarding=1
net.inet6.ip6.forwarding=1
Code:
ipfw nat 10 config ip 192.168.1.201
ipfw add 151 nat 10 ip from 192.168.8.1/24 to any out via igb0
ipfw add 152 nat 10 ip from any to any in via igb0
ipfw add 800 allow ip from any to any
Bridge0: 192.168.8.1
Client: 192.168.8.202
And the client can't access outside network. and the redirect_port also did not work.
How can I fix this? Thanks for help!
Last edited: