Cant connect OpenVPN to Opnsense Server No Encryption

Hi guys,

I have setup an internal VPN whihc does not have access to internet and wish to use it without encryption.
Now I have managed to do this with OpnSense OpenVPN server and my Ubuntu laptop can use the config file to connect and work without issues. but the same config file does not work with OpenWrt 19 running the latest OpenVPN client app. Here is my config file;

dev tun
persist-tun
persist-key
auth none
cipher none
client
resolv-retry infinite
remote xxx.xxx.xxx.xx 1195 udp
lport 0
verify-x509-name "C=xx, ST=xxxxxx, L=xxxxxx, O=xxxxxi, emailAddress=xxxx@xxxx.com, CN=Int_Cert_new" subject
remote-cert-tls server
alg=none
ncp-disable

Can someone confirm if the OpenWRT client for OpenVPN is able to accept such config file? Again my ubuntu laptop works like a charm but for OpenWRT it doesnt start....

this is from the log
daemon.err openvpn(testnonenc)[29748]: Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/testnonenc.ovpn:4: cipher (2.4.7)

Thank you community in advance

1 Like

Looks wrong, remove it.

Yep, I confirm that it should be possible.
Tested on a couple of VMs with OpenWrt 19.07.7 and working OpenVPN configs.
Added the following options to both server and client configs and restarted the services:

auth none
cipher none

It appears to work fine.

If your problem persists, check the client connection log.

2 Likes

@vgaetera Thanks for your quick reply.

but when I did that i still get


 21 07:58:55 2021 daemon.err openvpn(testnonenc)[31225]: Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/testnonenc.ovpn:5: cipher (2.4.7)
Sun Feb 21 07:58:55 2021 daemon.warn openvpn(testnonenc)[31225]: Use --help for more information.

Try this way:

sed -i -e "s/\r//g" /etc/openvpn/*
/etc/init.d/log restart; /etc/init.d/openvpn restart; \
sleep 10; logread -e openvpn

You likely messed with some special Unicode characters like those:

If the issue persists, completely remove the related lines and carefully re-type them manually.

2 Likes

I am not sure what to do with that code? do I add it to the config or in shell?

Can you confirm which packages you had installed when it worked for you with no encryption?

Copy-paste the entire block of code to the shell.

Both OpenVPN server and client are configured according to the wiki:

2 Likes

OK ill try again

1 Like

Thank you for your help!

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.