Brownz
Dabbler
- Joined
- Sep 5, 2017
- Messages
- 23
Hi all Im new to freenas, Have recently tried transitioning my quick and easy warden plugins to iocage manual jails. I followed these guides to setup openvpn:
https://www.reddit.com/r/freenas/comments/41fhz3/configuration_guide_for_openvpn_and_ipfw_so_that/
https://forums.freenas.org/index.php?threads/openvpn-issues-in-new-jails-after-11-1.59828/
I have tried many different ways to install openvpn and followed many fixes that are meant to work to fix this error: "Cannot allocate TUN/TAP dev dynamically". I added
Issues:
Host Restart - Jail ifconfig (end section):
Jail Restart 1 - Jail ifconfig:
Jail Restart 2 - Jail ifconfig:
Jail Log:
What have I done wrong?
Do I need to create a tun interface on the host?
https://www.reddit.com/r/freenas/comments/41fhz3/configuration_guide_for_openvpn_and_ipfw_so_that/
https://forums.freenas.org/index.php?threads/openvpn-issues-in-new-jails-after-11-1.59828/
I have tried many different ways to install openvpn and followed many fixes that are meant to work to fix this error: "Cannot allocate TUN/TAP dev dynamically". I added
devfs rule -s 4 add path 'tun*' unhide
to preinit to try and fix the issue to no avail. When i looked at the ifconfig
the interfaces looked a little odd.Issues:
- Openvpn states "Cannot allocate TUN/TAP dev dynamically" no matter what I do and despite the rules fix.
- On host restart the jail listed 256 tun interfaces (tun0 - tun255).
- On jail restart a single tun interface named tun256, this tun name increments on each subsequent restart.
- On host restart the manually created tun0 interface on host is removed.
Host Restart - Jail ifconfig (end section):
Code:
tun244: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun245: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun246: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun247: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun248: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun249: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun250: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun251: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun252: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun253: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun254: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun tun255: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun
Jail Restart 1 - Jail ifconfig:
Code:
root@qbittorrent:~ # ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> groups: lo epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 02:ff:60:5b:ca:e6 hwaddr 02:06:d0:00:06:0b inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=1<PERFORMNUD> media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active groups: epair tun256: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun
Jail Restart 2 - Jail ifconfig:
Code:
root@qbittorrent:~ # ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> groups: lo epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 02:ff:60:5b:ca:e6 hwaddr 02:06:d0:00:06:0b inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=1<PERFORMNUD> media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active groups: epair tun257: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> nd6 options=1<PERFORMNUD> groups: tun
Jail Log:
Code:
Aug 3 11:34:49 qbittorrent openvpn[6093]: OpenVPN 2.4.6 amd64-portbld-freebsd11.1 [SSL (OpenSSL)] [LZO] [LZ4] [MH/RECVDA] [AEAD] built on Jul 3 2018 Aug 3 11:34:49 qbittorrent openvpn[6093]: library versions: OpenSSL 1.0.2o-freebsd 27 Mar 2018, LZO 2.10 Aug 3 11:34:49 qbittorrent openvpn[6094]: LZO compression initializing Aug 3 11:34:49 qbittorrent openvpn[6094]: Control Channel MTU parms [ L:1622 D:1212 EF:38 EB:0 ET:0 EL:3 ] Aug 3 11:34:49 qbittorrent openvpn[6094]: Data Channel MTU parms [ L:1622 D:1450 EF:122 EB:406 ET:0 EL:3 ] Aug 3 11:34:49 qbittorrent openvpn[6094]: Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-client' Aug 3 11:34:49 qbittorrent openvpn[6094]: Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-server' Aug 3 11:34:49 qbittorrent openvpn[6094]: TCP/UDP: Preserving recently used remote address: [AF_INET]89.238.154.120:1198 Aug 3 11:34:49 qbittorrent openvpn[6094]: Socket Buffers: R=[42080->42080] S=[9216->9216] Aug 3 11:34:49 qbittorrent openvpn[6094]: UDP link local: (not bound) Aug 3 11:34:49 qbittorrent openvpn[6094]: UDP link remote: [AF_INET]89.238.154.120:1198 Aug 3 11:34:49 qbittorrent openvpn[6094]: TLS: Initial packet from [AF_INET]89.238.154.120:1198, sid=bf11cff3 45e3bd08 Aug 3 11:34:49 qbittorrent openvpn[6094]: VERIFY OK: depth=1, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=Private Internet Access, name=Private Internet Access, emailAddress=secure@privateinternetaccess.com Aug 3 11:34:49 qbittorrent openvpn[6094]: VERIFY KU OK Aug 3 11:34:49 qbittorrent openvpn[6094]: Validating certificate extended key usage Aug 3 11:34:49 qbittorrent openvpn[6094]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication Aug 3 11:34:49 qbittorrent openvpn[6094]: VERIFY EKU OK Aug 3 11:34:49 qbittorrent openvpn[6094]: VERIFY OK: depth=0, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=34c4672cd66a088004c427b9803f865e, name=34c4672cd66a088004c427b9803f865e Aug 3 11:34:49 qbittorrent openvpn[6094]: Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 2048 bit RSA Aug 3 11:34:49 qbittorrent openvpn[6094]: [34c4672cd66a088004c427b9803f865e] Peer Connection Initiated with [AF_INET]89.238.154.120:1198 Aug 3 11:34:50 qbittorrent openvpn[6094]: SENT CONTROL [34c4672cd66a088004c427b9803f865e]: 'PUSH_REQUEST' (status=1) Aug 3 11:34:50 qbittorrent openvpn[6094]: PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 209.222.18.222,dhcp-option DNS 209.222.18.218,ping 10,comp-lzo no,route 10.83.10.1,topology net30,ifconfig 10.83.10.6 10.83.10.5,auth-token' Aug 3 11:34:50 qbittorrent openvpn[6094]: auth-token received, disabling auth-nocache for the authentication token Aug 3 11:34:50 qbittorrent openvpn[6094]: OPTIONS IMPORT: timers and/or timeouts modified Aug 3 11:34:50 qbittorrent openvpn[6094]: OPTIONS IMPORT: compression parms modified Aug 3 11:34:50 qbittorrent openvpn[6094]: OPTIONS IMPORT: --ifconfig/up options modified Aug 3 11:34:50 qbittorrent openvpn[6094]: OPTIONS IMPORT: route options modified Aug 3 11:34:50 qbittorrent openvpn[6094]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified Aug 3 11:34:50 qbittorrent openvpn[6094]: Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:406 ET:0 EL:3 ] Aug 3 11:34:50 qbittorrent openvpn[6094]: Outgoing Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key Aug 3 11:34:50 qbittorrent openvpn[6094]: Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication Aug 3 11:34:50 qbittorrent openvpn[6094]: Incoming Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key Aug 3 11:34:50 qbittorrent openvpn[6094]: Incoming Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication Aug 3 11:34:50 qbittorrent openvpn[6094]: ROUTE_GATEWAY 192.168.1.1/255.255.255.0 IFACE=epair0b HWADDR=02:ff:60:5b:ca:e6 Aug 3 11:34:50 qbittorrent openvpn[6094]: Cannot allocate TUN/TAP dev dynamically Aug 3 11:34:50 qbittorrent openvpn[6094]: Exiting due to fatal error
What have I done wrong?
Do I need to create a tun interface on the host?
Last edited: