longzuyuan / ics-openvpn

Automatically exported from code.google.com/p/ics-openvpn
0 stars 0 forks source link

push more than 100 route rules from vpn server #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I want to push some route rules to client, so i should add "max-routes 1000" at 
the head of client' config file.

how can i eidt the file on my phone?

1. i try to add it to /data/data/de.blinkt.openvpn/files/XXXXX.vp, but i can't 
edit with a text editor.

2. android.conf in /data/data/de.blinkt.openvpn/shared_prefs will overwrite 
when i run this application.

3. i add "max-routes 1000" at 'Adavance settings -> Options', seems to appear 
at the end of the final config file.

Original issue reported on code.google.com by chentao....@gmail.com on 28 Oct 2012 at 1:40

GoogleCodeExporter commented 9 years ago
The advanced options are at the end of the configuration file but that should 
make no difference for your use case. 

Original comment by arne@rfc2549.org on 28 Oct 2012 at 5:01

GoogleCodeExporter commented 9 years ago
Yes, that is my confusion exactly.
I want know what can i do to make it work correct ?

Original comment by chentao....@gmail.com on 29 Oct 2012 at 1:30

GoogleCodeExporter commented 9 years ago
If add the max-routes 1000 at custom options which error message do you get?

Original comment by arne@rfc2549.org on 29 Oct 2012 at 9:05

GoogleCodeExporter commented 9 years ago
=========================
P:OpenVPN ROUTE:cannot add more than 100 routes -- please increase the 
max-routes option in the client configuration file
P:Exiting due to fatal error
=========================

Text pastes above is what i get from the log window.

Original comment by chentao....@gmail.com on 29 Oct 2012 at 1:18

GoogleCodeExporter commented 9 years ago
can you check if the generated configuration includes any route x.x.x.x 
options? If yes disable the default route options.

Original comment by arne@rfc2549.org on 29 Oct 2012 at 1:30

GoogleCodeExporter commented 9 years ago
yes, there is a route options "route 0.0.0.0. 0.0.0.0". When i disable the 
options, openvpn will reconnect over and over again.

what is this default route rule means?should i add it manual?

Original comment by chentao....@gmail.com on 29 Oct 2012 at 1:59

GoogleCodeExporter commented 9 years ago
e, when i add a default route rule manually, it show the " please increase the 
max-route option ..." again

Original comment by chentao....@gmail.com on 29 Oct 2012 at 2:03

GoogleCodeExporter commented 9 years ago
under routing and options you have to option to specify "use default route" you 
should delete that route and try without it. then the "cannot add more than 100 
routes" error message should disappear

Original comment by arne@rfc2549.org on 29 Oct 2012 at 2:05

GoogleCodeExporter commented 9 years ago
i have specified "use default route", then a route "route 0.0.0.0 0.0.0.0" add 
to the final configuration file. You means i should delete that route in the 
final configuration file?

Original comment by chentao....@gmail.com on 29 Oct 2012 at 2:12

GoogleCodeExporter commented 9 years ago
You should not specify the "use default route" option. I think openvpn 
allocates the route structe on the first route statement. If this statements 
happens to be before the max-routes option the max-routes option is ignored.

Original comment by arne@rfc2549.org on 29 Oct 2012 at 2:17

GoogleCodeExporter commented 9 years ago
I have submitted a patch to OpenVPN which should give a better error message.

Original comment by arne@rfc2549.org on 20 Nov 2012 at 9:40

GoogleCodeExporter commented 9 years ago
The new patch that reports the error is now in 0.5.25.

Original comment by arne@rfc2549.org on 16 Dec 2012 at 9:49