qlwpub / ics-openvpn

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

LocalPort bind less than 1024 failed in rooted device #218

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
In Rooted device if I want to use local port ( < 1024 ) like 53 , 80 etc.
It is failing saying Permission denied . Local port bind failed.

Is there any way to run it as SU and overcome this problem.

Thank you

Original issue reported on code.google.com by arun.s...@gmail.com on 10 Dec 2013 at 6:13

GoogleCodeExporter commented 9 years ago
It is not implemented and I have not intentation to implement running OpenVPN 
as root since it is not really needed. I might reconsider if there is a *valid* 
use case for that but so far there only users confusing local and remote port.

Original comment by arne@rfc2549.org on 10 Dec 2013 at 8:07

GoogleCodeExporter commented 9 years ago
Thanks.
Can you please give pointer how to fix that.
Like I can call - Process p = Runtime.getRuntime().exec("su");

Do I need to call minivpn after that. is it complex to implement. If it is not 
much complex then I like to give a try.
Sometime to bypass firewall one need to set local port like - 53, 80 , 443 etc.

Thank you

Original comment by arun.s...@gmail.com on 10 Dec 2013 at 8:58

GoogleCodeExporter commented 9 years ago
Since 4.3 and 4.4 are using SELINUX it might be easier to use SELINUX to allow 
OpenVPN to bind on port < 1024 than to run OpenVPN as root.  (Like 
http://www.eonlinegratis.com/2013/using-selinux-to-force-linux-to-allow-programs
-to-bind-to-port-numbers-lower-than-1024/)

Look in OpenVPNThread how OpenVPN is started but this will probably break since 
LD_* variables normally don't survive su.

Original comment by arne@rfc2549.org on 10 Dec 2013 at 9:58