bypass all Iran's IPs but ERROR: "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
peymanhaji
OpenVpn Newbie
Posts: 1
Joined: Mon May 08, 2023 11:50 pm

bypass all Iran's IPs but ERROR: "Maximum option line length (256) exceeded"

Post by peymanhaji » Mon May 08, 2023 11:59 pm

HI
I'm Iranian and I use openvpn for bypass censorship in iran

my problem is:
I want all Iran's IPs connect directly and not through openvpn(bypass from openvpn)
the solution is add this line to the config:
"route 'ip' 'subnet' net_gateway"
and replace 'ip' and 'subnet' with your ip and subnet for example:
"route 5.145.116.0 255.255.255.0 net_gateway"
bypass 5.145.116.0 - 5.145.116.255 from openvpn and route them directly

my problem is: we have about 2000 IPs and subnet that belongs to iran(and cannot merge)
if i add them one by one to the oenvpn config file the config file now has more than 2000 lines
and when i connect using that config file this error appear:
"Maximum option line length (256) exceeded"

in window or linux system we can route ips easily without add them to the openvpn config file

but in android and ios it seems the only way is add ips to the config file(does not matter add them to server config file with "push" or in client config file directly the error appear in both when config file has more than 256 line)


is there any way to add more than 256 lines to the config file?
or is there other solution to bypass all Iran's IPs from openvpn in android and ios?

Post Reply