cmaumo / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
0 stars 0 forks source link

OpenVPN vpn not recognized #368

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
 * sipdroid 1.4 beta on Cyanogen Mod 4.15.1

Which type of network are you using?
 * OpenVPN, configured via the vpn settings (new in Cyanogenmod)

Please provide any additional information below.

Since the last Cyanogenmod version it is possible to configure openvpn vpn
connections in the normal vpn settings.Unfortunately these connections are
not recognized by sipdroid, so I have to enable the use of 3G manually to
trick sipdroid into using this VPN. Would be nice if Sipdroid would
recognize the openvpn connection similar to the ipsec connections.

Original issue reported on code.google.com by bernd.ze...@gmail.com on 12 Mar 2010 at 9:47

GoogleCodeExporter commented 9 years ago
I believe SipDroid itself doesn't need any additional support to connect 
through an 
OpenVPN tunnel.

If your device is getting an VPN connection and an IP on the VPN network, you 
should 
be able to simply point SipDroid to the server name/IP inside the VPN/Firewall. 
This 
is of course assuming that the VPN subnet is accessible to the SIP server for 
which 
you are trying to communicate, and vice versa.

Original comment by majostm on 12 Mar 2010 at 11:25

GoogleCodeExporter commented 9 years ago
Sure, that is not the issue :)

In the settings I'm able to check 'VPN' as a connection I want to use. Although 
I may
understand it wrong (does it support pbxes vpn only???) - I'd assume that when 
this
ox is checked and a ipsec/openvpn vpn (see the android wireless config) is 
running,
sipdroid should try to connect. The vpn connectionsare not started 
automatically, so
it makes sense to check if one is available and connect via it then.

Original comment by bernd.ze...@gmail.com on 13 Mar 2010 at 9:08

GoogleCodeExporter commented 9 years ago
I have the same issue. Sipdroid recognizes neither the PBXes PPTP VPN nor the 
OpenVPN connection. But other applications work fine with the VPN.

Original comment by jac...@gmail.com on 10 Apr 2010 at 4:10

GoogleCodeExporter commented 9 years ago
I find that when VPN is connected, Sipdroid actually knows it and will try to 
start 
itself if it is not running at that time (Sipdroid call options have 3G 
disabled and 
VPN enabled). But it will fail and cause the system popup "force close". I 
haven't 
read the code, but it looked like something was hard coded in the program or 
Sipdroid was not aware that VPN changed something in the system. Other programs 
are 
running fine with the VPN connection, including SipAgent and the Sipdroid 
ripoff 
named "aSip". 

Original comment by jac...@gmail.com on 12 Apr 2010 at 9:23

GoogleCodeExporter commented 9 years ago
Issue 461 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 15 May 2010 at 7:30

GoogleCodeExporter commented 9 years ago
Same issue here (does not recognize open vpn), i think it was working for a 
while,
then my phone essentially blew up and had to uninstall home++, went back to 
stock
home app, uninstalled sipdroid and re-downloaded from market v65 and then no
connection over openvpn using 12vpn, does work over L2TP, but rogers keeps 
dropping
my connection to this type of vpn, running cyanogen 4.15 eb1 on dream. 

Original comment by 6492...@gmail.com on 27 May 2010 at 8:53

GoogleCodeExporter commented 9 years ago
update, just uninstalled v65 that i downloaded from market and installed ver 
1.4.7 i
download from the sipdroid google page, and voila it works over openvpn. note 
not
sure the vpn is working as it should though, whatismyipaddress.com says i have a
rogers address, and a "Suspected network sharing device". not sure this info is 
of
any help to anyone.

Original comment by 6492...@gmail.com on 27 May 2010 at 9:19

GoogleCodeExporter commented 9 years ago
Bug confirmed with sipdroid 1.5.5 and Cyanogen 6.0rc2: I have an asterisk 
server at home configured on the lan with 192.168.0.254 and only reachable from 
outside through an OpenVPN.

If I select only "Use VPN" in sipdroid, it does not register. If I try to force 
a call it says me "cannot find a suitable network".

If I select "Use 3G" and "Use VPN" in sipdroid; then it registers but with 
wrong IP address as seen on my asterisk log: Registered SIP '2101' at 
10.166.77.197 port 41168

It should have registered with my openvpn address (192.168.254.x).

What is strange is that it reaches asterisk via the VPN ! I suppose that 
sipdroid put wrong ip in the request ?

Original comment by metap...@gmail.com on 2 Aug 2010 at 5:07

GoogleCodeExporter commented 9 years ago
it seems that sipdroid is sending the incorrect ip on its SIP packets. Its 
getting the ip of the first interfaces, it seems to me.

Original comment by lume...@gmail.com on 17 Aug 2010 at 3:25

GoogleCodeExporter commented 9 years ago
I have the same problem.

In fact, Sipdroid is using the last IP adress from the last, no loopback, 
network interface it found. In my case, each time it is the WAN interface 
(eth0) but I think it's random.
The problem is in the SIP messages (eg : via header) and in the UDP packet (not 
sent from the right iface).

I made a patch to force Sipdroid to use a specific network.
The patch add a new option in "Advanced Options" to tell Sipdroid wich 
interface to use. In my case tun0 but it's plain text so you can you can select 
what you want (tunX, tapX, etc...). I dont think it's a good idea to only show 
current interfaces because you'll not be able to configure Sipdroid if the 
OpenVPN is down.

If a commiter can test it and merge it if he think it's an important option. If 
the new option is empty, it should not have any impact (at least I hope :) ).

Original comment by charles....@gmail.com on 23 Aug 2010 at 7:20

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yup, here's a packet capture showing the exact issue.

LAN IP:  192.168.50.3  
VPN IP:  10.1.100.3

    Source: 10.1.100.3 (10.1.100.3)
    Destination: 10.1.100.1 (10.1.100.1)
User Datagram Protocol, Src Port: 45023 (45023), Dst Port: sip (5060)
    Source port: 45023 (45023)
    Destination port: sip (5060)

    Message Header
        Via: SIP/2.0/UDP 192.168.50.3:45023;rport;branch=z9hG4bK52426
            Transport: UDP
            Sent-by Address: 192.168.50.3
            Sent-by port: 45023
            RPort: rport
            Branch: z9hG4bK52426
        Max-Forwards: 70
        To: <sip:1005@10.1.100.1>
            SIP to address: sip:1005@10.1.100.1
                SIP to address User Part: 1005
                SIP to address Host Part: 10.1.100.1
        From: <sip:1005@10.1.100.1>;tag=z9hG4bK26525369
            SIP from address: sip:1005@10.1.100.1
                SIP from address User Part: 1005
                SIP from address Host Part: 10.1.100.1
            SIP tag: z9hG4bK26525369
        Call-ID: 787735223063@192.168.50.3
        CSeq: 1 REGISTER
            Sequence Number: 1
            Method: REGISTER
        Contact: <sip:1005@192.168.50.3:45023;transport=udp>
            Contact Binding: <sip:1005@192.168.50.3:45023;transport=udp>
                URI: <sip:1005@192.168.50.3:45023;transport=udp>
                    SIP contact address: sip:1005@192.168.50.3:45023
        Expires: 3600
        User-Agent: Sipdroid/1.5.7 beta/Nexus One
        Content-Length: 0

Original comment by ubercl...@gmail.com on 25 Sep 2010 at 7:43

GoogleCodeExporter commented 9 years ago
Can someone tell me how to apply this patch.  I have a rooted HTC Desire with 
sipdroid 1.5.7.apk installed.

Original comment by jcrease...@googlemail.com on 2 Oct 2010 at 9:13

GoogleCodeExporter commented 9 years ago
charles.blonde, can you post a link to download the compiled apk file?

Original comment by blakspl...@gmail.com on 8 Oct 2010 at 6:23

GoogleCodeExporter commented 9 years ago
Exactly the same issue when using PPTP VPN.

sipdroid contacts and connects to the private server address over the vpn, but 
the sip registration has the external WAN address rather than vpn lan address.

thats with sipdroid 1.6.1

Original comment by phil.sno...@gmail.com on 1 Nov 2010 at 10:07

GoogleCodeExporter commented 9 years ago
I am using 2.0.1 Beta with VPN Connection on a rooted Galaxy Tab.
Same issue here, looks like it uses the WLAN interface address, not the Tunnel 
address.
Please share how to apply the patch.

Original comment by trond.li...@gmail.com on 20 Nov 2010 at 8:58

GoogleCodeExporter commented 9 years ago
I have taken the patch from #10 and modified it so that you can configure a 
'Preferred network interface' in advanced settings.
If you fill in an interface name there sipdroid will try to use the IP from 
this interface. If the preferred interface is not configured or not available 
it will fall back to its normal behavior.

This way you can use the same configuration with and without VPN connection.

But you still have to check 'Use 3G' to make it use the VPN connection.

The patch is against trunk, r601.

Original comment by clu...@gmail.com on 29 Nov 2010 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you to all those who diagnosed the problem and offered fixes!

Due to firewall (or NAT) on T-Mobile's 3G network, I can't use sipdroid without 
OpenVPN.  (I have other SIP peers that work fine, and after extensive debugging 
I've concluded it's on T-Mob's side. I'm in Washington State.)  This bug is 
thus critical for me.

cluk33: Would you mind posting a compiled APK with patch #17 above, for easy 
testing?  

Original comment by dereks...@gmail.com on 12 Dec 2010 at 1:05

GoogleCodeExporter commented 9 years ago
You can find a binary package here:

http://cluk.pingworks.net/sipdroid-2.0.1-1.apk

Original comment by clu...@gmail.com on 16 Dec 2010 at 6:51

GoogleCodeExporter commented 9 years ago
Any update on this issue? From the output of TCPdump, I can see the culprit is 
the STUN setting. When STUN is not used, Sipdroid connects to the server via 
VPN immediately. But without STUN, Sipdroid has problems with some providers. 
When STUN is enabled, Sipdroid sends STUN request via VPN first and gets reply 
immediately. However, Sipdroid then sends STUN request via the non-VPN network 
from which it will never get a reply. So Sipdroid just waits for the non-VPN 
STUN reply until it is timed out which is a long wait and renders Sipdroid 
unusable. I am not sure the purpose of the second non-VPN STUN request. But if 
it is removed from the code, the problem will be solved.

Original comment by jac...@gmail.com on 11 Mar 2011 at 3:25

GoogleCodeExporter commented 9 years ago
Hi
I see pretty much the same issue on 2.2 beta. Will there be a patch for this 
version or is it supposed to already in there? I can provide more details if 
needed. 
CM7 on Droid 1 using openvpn settings. Same on the wife's rooted but otherwise 
stock droid x.

Or is there a more recent thread I missed and should be looking at?

Thanks,
Don

Original comment by don.harp...@gmail.com on 3 May 2011 at 8:14

GoogleCodeExporter commented 9 years ago
Me too. CM7 on Desire and 2.2 beta. I cant register via OpenVPN

Original comment by adwords-...@dnet.es on 4 May 2011 at 2:15

GoogleCodeExporter commented 9 years ago
Do the sipdroid developers not care about this issue?  

Original comment by ubercl...@gmail.com on 4 May 2011 at 2:18

GoogleCodeExporter commented 9 years ago
Patched package from #19 is working for me using OpenVPN.

Original comment by edmun...@gmail.com on 1 Aug 2011 at 11:16

GoogleCodeExporter commented 9 years ago
I use the built-in IPSEC VPN on Android, and the package from #19 did not work. 
This issue hasn't been fixed or updated in a long time, what's going on?

Original comment by bryan.y...@gmail.com on 2 Nov 2011 at 8:04

GoogleCodeExporter commented 9 years ago
Hi, 

i'm using a private server asterisk+openvpn & native sip client embedded in 
android. 
Asterisk bind only openvpn address.
Sip client don't register on asterisk at server's openvpn ip.
I've solved this problem enabling "redirect gateway" option on my android phone 
for force all my phone traffic over vpn and configuring iptables line on the 
server for internet navigation.
I hope this can help anyone.

Regards

Lulluxxx

Original comment by lulluxxx on 28 Nov 2011 at 3:20

GoogleCodeExporter commented 9 years ago
Hi, we live in a country where VOIP is blocked, so tht only way we can connect 
sipdroid is suing VPN ( IPsec ). After the new ICS update from Google, the 
sipdroid does not sense the VPN, even when it is clicked in the settings. So 
what I do i click both wifi & VPN in the settings and then it is OK. This bug 
is also in the new version 2.5 released 3 days ago. kindly upgrade the sipdroid 
software to sense VPN. Thanks

Original comment by senp...@gmail.com on 23 Mar 2012 at 4:26

GoogleCodeExporter commented 9 years ago
Not sure if this is same problem as above, but it relates to SipDroid not 
working well over VPN:

Using version 2.9, and connectiong from SGS3 over VPN to Cisco Call Manager 
(CCM). 
It connects without problems, and it can place calls but have one-way audio 
(only from SGS3 to phone I called).

Most probable reason is that SipDroid is sending to CCM wrong IP address - one 
from WAN interface rather than one from VPN interface. If in SIP audio stream 
is initiated from both sides, then other phone will try to use that (wrong, 
WAN) address and thats why audio from other phone to my SGS3 will not work, 
while audio from SGS3 to that phone works.

Again, this is not issue about SipDroid USING wrong address (it use correct VPN 
address to establish connection), it is about SipDroid SENDING wrong IP address 
to CCM (it sends SGS3 WAN address instead of VPN interface address). 

Original comment by gm.ne...@gmail.com on 12 Feb 2013 at 10:34