Maximum option line length (256) exceeded

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
mikecamposgr
OpenVpn Newbie
Posts: 1
Joined: Fri Mar 11, 2022 7:04 am

Maximum option line length (256) exceeded

Post by mikecamposgr » Fri Mar 11, 2022 7:41 am

I haven't played around with OpenVPN in a while and I ran into this error during a fresh install of v.2.5.5 on a Windows 10 machine tonight. I'm beating my head against the wall at this point. I can't figure out what this error means. "Maximum option line length (256) exceeded" I could really use a hand here.

Server Config

port 1234
proto udp
dev tun
ca “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ca.crt”
cert “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\issued\\SERVER.crt”
key “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\private\\SERVER.key” # This file should be kept secret
dh “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\dh.pem”
server 10.20.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
client-to-client
duplicate-cn
keepalive 10 120
tls-auth “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\easytls\\tls-auth.key” 0 # This file is secret
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1


Logging Data

Options error: In server7.ovpn:1: Maximum option line length (256) exceeded, line starts with port 1194
proto udp
dev tun
ca “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ca.crt”
cert “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\issued\\SERVER.crt”
key “C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\private\\SERVER.key” # This file should
Use --help for more information.


Thank you in advance!!

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Maximum option line length (256) exceeded

Post by TinCanTech » Sat Mar 12, 2022 3:21 pm

You have probably stripped out all line endings, somehow ..

kimboslice
OpenVpn Newbie
Posts: 3
Joined: Tue Nov 01, 2022 3:57 pm

Re: Maximum option line length (256) exceeded

Post by kimboslice » Tue Nov 01, 2022 3:59 pm

Wrong. Fresh install on windows has macintosh line endings (CR)

The correct answer here was use Notepad++ -> edit -> EOL Conversion -> Windows (CR LF)

Post Reply