Nimish Jain wrote:

> This is beneficial for new users using the 'default'
> libvirt network configuration on FreeBSD, to get
> a VM up and running quickly.
> 
> Also fixes a typo ('netowork')
> 
> Signed-off-by: Nimish Jain <[email protected]>
> ---
>  docs/drvnetwork.rst | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/drvnetwork.rst b/docs/drvnetwork.rst
> index 23082310ba..881b828d5f 100644
> --- a/docs/drvnetwork.rst
> +++ b/docs/drvnetwork.rst
> @@ -10,14 +10,17 @@ Platform-specific notes
>  FreeBSD
>  -------
>  
> -FreeBSD netowork driver uses the pf firewall. Libvirt managed pf rules
> +FreeBSD network driver uses the pf firewall. Libvirt managed pf rules
>  are created within anchors. Anchors need to be configured manually by
> -the user. Sample ``/etc/pf.conf`` might look like:
> +the user. Sample ``/etc/pf.conf`` with a basic NAT configuration
> +might look like:
>  
>  ::
>  
>   scrub all
>  
> + nat on em0 from {192.168.122.0/24} to any -> (em0)
> +

This should not be necessary. The 'default' network enables forwarding,
so NAT should be configured in the anchor, e.g.:

# pfctl -s Anchors -a "libvirt/default" -s nat
nat on re0 inet from 192.168.122.0/24 to <natdst> -> (re0) port 1024:65535 
round-robin

As the default network does not specify the forward interface, the
default route interface will be used.

If it does not work this way in your case, I'd be curious to know
the details.

>   nat-anchor "libvirt\*"
>   anchor "libvirt\*"
>  
> -- 
> 2.39.5 (Apple Git-154)
> 

Reply via email to