dev tun also requires ifconfig

Started by mauzilla, March 25, 2022, 07:13:44 PM

Previous topic - Next topic
I need to setup a VPN between a single device at office A to connect to 2 - 3 devices at site B. I using openVPN but unable to get a successful connection with log indicating:

2022-03-25 19:38:38 open_tun
2022-03-25 19:38:38 tap-windows6 device [OpenVPN TAP-Windows6] opened
2022-03-25 19:38:38 ERROR: --dev tun also requires --ifconfig
2022-03-25 19:38:38 Exiting due to fatal error


My local config looks like this:

dev tun
persist-tun
persist-key
cipher AES-128-CBC
auth SHA1
client
resolv-retry infinite
remote REMOTESITEIP 1194 udp
lport 0
remote-cert-tls server
pkcs12 Acme_DC_VPN_intellihost.p12
tls-auth Acme_DC_VPN_intellihost-tls.key 1


On the server side, I have the following:


  • Peer to Peer
  • UDP
  • TAP
  • IPv4 Tunnel Network: 192.168.231.0/30
  • I want to give access to network 192.168.230.0/30

From what I can gather, I need to specify in my config file what IP address the connecting device would get (I assume then in the 192.168.231.0/30 range like 192.168.231.2? I am able to connect fine using TUN, TAP however gives the above.




If you set server to tap why not set the client to tap as well?


Cheers,
Franco

If using tap the remote device is bridged into your local LAN so regularly the IP address is not provided by OpenVPN but by you local DHCP server. If you want to use a routed subnet - which I would recommend for reasons I don't have the time to explain en detail just now, please just take that bridged VPN has "issues", always - then you need to use tun instead of tap.

HTH,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)