Not certainly in that way. We are talking about OpenConnect. It also uses tun interfaces. This client is not as detailed as OpenVPN and important settings - nat, port remapping - can only be done using a firewall. I use PF.I'm not sure what your goal is, but I know most tun-type interfaces are for a VPN. Is this what you are trying to do? If so you could do this by setting up openvpn or maybe you can look at its source code and mimic how it does this. Maybe you just need a virtual lan, which can use other protocols. If so FreeBSD has a lot of documentation on this here. Again, not 100% sure what your goal is, but hopefully that helps.
cloned_interfaces="tun77"
ifconfig_tun77_name="myfunname"
I don't really see how this problem can be controlled. Is renaming the interface from tunXX not enough?but if you have control on your system over what is using tunnels then it shouldn't be an issue.
Yes, alone the problem with NAT, if the VPN client itself cannot do it, can drive you crazy.I usually use static names for my tunnels to make writing pf rules more straightforward.
Where is it described what commands these macros are expanded into?Code:cloned_interfaces="tun77" ifconfig_tun77_name="myfunname"
cloned_interfaces="tun77"
expands into the ifconfig tun77 create
command. ifconfig_tun77_name="myfunname"
generate? man tun
would yeild you amazing results. Have you looked?tun devices are created using interface cloning. This is done using the
“ifconfig tunN create” command. This is the preferred method of creating
tun devices. The same method allows removal of interfaces. For this,
use the “ifconfig tunN destroy” command.
ifconfig tun0 name wg0
man rc.conf
, search for the "network_interfaces" section for a quick blurb about the ifconfig_{interface}_name variable. More generally you can check rc.conf for ifconfig_* stuff to find more capabilities, or to check for things rc.conf related.