Hi, In the bhyve wiki page[1], the PF rules given to enable NAT on wlan0 should be updated. Given rule set in [1] is nat on wlan0 from bridge0:network to any -> (bridge0) pass out all pass in all Correct rule set should be nat on wlan0 from (bridge0:network) to any -> (bridge0) pass out all pass in all [1] https://wiki.freebsd.org/bhyve
With the rules-set given in the Wiki page, pf fails to start and complains about an incorrect rule in line 1
Hi, did you manage get you NAT config going?
Hi there Not really....In fact, I sent an email to freebsd-virtualization mailing list on the matter. There is also a forum discussion on the matter [1] [1] https://forums.freebsd.org/threads/56285/
I managed to get my VM's network connection fixed by using an indirect approach. This email [1] and this forum thread [2] have all details. In short, what I did was; - assigning an static IP address to tap0 on the host machine - assigning an static IP address to vtnet0 on the guest machine - use tap0 IP address as the defaultrouter in rc.conf - use pf(4) to forward traffic from tap0 to wlan0 (contents of relevant configration files are give in [2]) I did not use the bridge0 interface, in fact I removed it completely. Using static IP addresses and PF rules to redirect/NAT the traffic were all needed for me to get it working. However, as you have more VMs around, this configuration might get hard to manage.... I still think that bhyve wiki should be updated with more information on the usage of wlan0 interface with bhyve (have seen some other posts in the Internet from people having similar/same issues) [1] https://lists.freebsd.org/pipermail/freebsd-virtualization/2016-May/004465.html [2] https://forums.freebsd.org/threads/56285/