openvpn - tethering routing - Galaxy S II Q&A, Help & Troubleshooting

Hello,
SG2/i9100 Droid: 2.3.5
Im running my Ovpn Client fine - everything gets routed - dns is fine too so no issues
But i want to use Wifi and USB tethering to give VPN Connection to my Laptop or any other connected Devices
Since the phone is the router it should not be nessesary using masquerading but routing not really works
Anyone accomplished that already?
Ife tried it with USB and Wifi tether - i can ping the tun interface from the laptop but i cannot ping the vpn server itself
i can do a traceroute from pc - but it stops at the tether gateway on the phone so no routing forward
from the phone i can ping both
the routing table on the phone is as it should be - vpn net is routed to the ptp adress of the server and routing interface is the tun adapter
Ife also activated the forwaring - but it should be active anyway because of the active routing for the normal net
Ife also check iptables filter and nat rules but they are pretty emtpy - btw what is android using to masquerade the theter part ?
anyone any idea?
so it must be a firewalling thing ?

Bump
Really noone tried using the phone as an router?
Sent from my GT-I9100 using XDA App

Yeah I'd like to get this working too please. Tried last night without success using both USB and WiFi... perhaps can figure something more useful out with looking at iptables of phone? Maybe we'll have to configure manual route to get from tethered subnet of phone onto the VPN.

Here we go:
http://forum.xda-developers.com/showpost.php?p=33749904

Related

Got Pandora and Market working with Dock *sorta

Just bought the Malata Dock for my Gtab. I'm currently running Zyhong's Gtab beta 3.2.
As stated by others, Pandora and Google Market fail to stream/download when using Ethernet only.
This is still early and hopefully a dev will point me in the right direction, but I am able to make the tablet use the ethernet connection for Pandora and Market.
Boot Gtab on dock with Ethernet connected. At this point most things work except Pandora/Market.
Using my Droid Inc, I turned on Wireless Tether in Infrastructure mode.
Configure wireless on the tab. Once it connects, go to Settings -> Wifi and modify the wireless connection. I configured the ip address, gateway and DNS 1&2 to work as if the wireless connection was the wired connection.
At this point Pandora and Market will begin to work using the Ethernet. I confirm this by downloading "Angry Birds" from the market. 18MB download in about 30 seconds. Checked phone during this time and it had no bars on 1X...no way it was using the cell connection.
My current theory is the previously stated "Connectivity Status = True" setting. I'm guessing this gets set once the Wifi connection is establish.
If I now drop the wifi connection, Pandora and Market breaks.
I'm curious if it is possible to write an app or script to rename wlan0 to eth1 and eth0 to wlan0. I'm assuming the test for connectivity status = true is set to check wlan0 ?
Any ideas?
Another theory is that there are no DNS servers configured for the wired connection.
I'll be trying that later.
I don't have enough posts yet to ask in the developer forums for help....so if you know one of the devs who are interested in the dock, please point them over here.
With that said, I tested if setting the DNS server manually would have any effect. It appears that DHCP is setting the DNS servers after all with a wired only connection.
So I'm back to the Connectivity Status = True issue.
I'll be looking at how that check is performed and what initiates it. If I can cause the check to be performed on eth0 instead of just wlan0 I think that will fix it.
konman2k4 said:
Another theory is that there are no DNS servers configured for the wired connection.
I'll be trying that later.
Click to expand...
Click to collapse
Got my dock today. With wireless turned off, I can boot on the dock & draw a dhcp ip.
Can't be a DNS issue or you wouldn't be able to surf the net.
Can surf net via browser, play videos/music/pics from my Windows Media Center, Netflix plays fine & can even receive email (as long as the app is the one that does the checking & not me telling it to).
Pandora, Crackle, Market, Amazon App tore, & SlideME not worky (some say no connection while others just hang).
Turning on wireless at the same time results in drawing different ip for wireless. Netcfg show eth0 up with an ip/mask, wlan0 up with an ip/mask. Ifconfig shows data transfer on both interfaces (and different mac addresses).
Must be something the the apps are looking for wifi. or could it be that this is a phone OS & phones don't have ethernet connections (and that ethernet is not listed in Settings, Wireless & Networks)?
At work we don't have wireless, so I used my phone with "wireless tether" to make a connection. Once the wireless network is seen and connected to, I modified the wireless network settings on the tablet so that the gateway, dns, subnet mask and IP are all valid on the wired connection. As for IP just make one up that is not already in use that is valid for the wired network subnet.
This basically tells the tablet that yes you are connected to a wireless network, but with a routing trick you are sending all your traffic out the wired connection.
Since the dock charges the tablet, I connect the phone to the tablet to keep it charged while the wireless tether app is running.
BTW...if you install opera and flash, you can change your agent string to "desktop" within opera and use the web version of pandora all without having to do the fake wireless trick.
I can confirm Pandora and the Market works just fine doing this....as for you other apps I haven't tried those.
konman2k4 said:
At work we don't have wireless, so I used my phone with "wireless tether" to make a connection. Once the wireless network is seen and connected to, I modified the wireless network settings on the tablet so that the gateway, dns, subnet mask and IP are all valid on the wired connection. As for IP just make one up that is not already in use that is valid for the wired network subnet.
This basically tells the tablet that yes you are connected to a wireless network, but with a routing trick you are sending all your traffic out the wired connection.
Since the dock charges the tablet, I connect the phone to the tablet to keep it charged while the wireless tether app is running.
BTW...if you install opera and flash, you can change your agent string to "desktop" within opera and use the web version of pandora all without having to do the fake wireless trick.
I can confirm Pandora and the Market works just fine doing this....as for you other apps I haven't tried those.
Click to expand...
Click to collapse
Read you origianl post. My point was that it is not a DNS issue since with wireless turned off & starting the tab on the dock, internet works. If DNS was the issue then the browsers/etc would not be able to resolve the urls.
But, I did verify your theroy while making sure that there was no possiblity the tab was communicating via your cell/wifi.
I connected mine to the dock with wireless & ethernet connected. Verified both interfaces were up via ifconfig. Wifi connected to wireless access point & ehternet connect directly to a switch. Disconnect access point from switch so no physical connection to lan/wan from the access point, that way wireless connection to tab stays up but it goes nowhere & the only physical connection to the lan/wan is via ethernet. Mail works, Market works, Amazon store works, Pandora works.
Has to be the Connection Status issue in Android that is casuing the problem. Current ROMs must not take ethernet into consideration when checking status. I saw sample code on the net for Connection Status that only looks for Wifi.
I believe we need a rom dev to pursue this for it to work correctly.
Haven't been back to this thread in a bit, but now that I have my 10 posts, i'll start asking around in the Dev community if somebody can point me in the right direction.
konman2k4 said:
Haven't been back to this thread in a bit, but now that I have my 10 posts, i'll start asking around in the Dev community if somebody can point me in the right direction.
Click to expand...
Click to collapse
I did a new post in the Q&A forum back on 5 Aug & pointed it back here. Here's the new post http://forum.xda-developers.com/showthread.php?t=1204015. So far 59 views and a big 0 responses.

[Q] OSX lion l2tp VPN server connection

Posted here, since I believe this is a general and not device specific issue.
So, I have set up a VPN server on OSX Lion Server edition.
It is using l2tp with preshared key and username/password for login.
i(beep) works fine and connects. Laptop works fine and can connect.
But...
1. When Iam on local network (same IP segment) I can connect using Android native l2tp VPN connection setup with PSK and user/pass.
2. When I try to connect from external (3G or other WiFi net) I am unable to connect.
3. When I enabe native tether on Android device, and connect i(beep) to the Android AP, I still am able to connect from i(beep).
These three steps tells me it is not a carrier issue, and possibly an Android issue.
Did anyone experience this (and even better.....did you find a solution)?
Kinda like the l2tp connection for security, and also Lion natively does not supply pptp connection.
/Niel
I am trying to do the same thing, I havent got the VPN to function yet though but I think its a router issue among other things. I bought a domain name and I am using that with dyndns to help simplify the ip change issues... I am getting a new router to test here next week so hopefully I'll have a better idea.
However now I am worried I'll run into the same issue as you!! lol... Its been a while since you posted, have you found a solution yet?
No. Didn't find a solution, but you might be correct in assuming its a router issue. Have a Netgear myself, and those have had quite a few issues.
Sent from my GT-I9100 using xda premium
I ended up getting a new Airport and it has pretty cool setup integration with the Server / Airport Utility, however I still cannot connect with the VPN connection.
My initial reason to set this up was to use PLEX... AND this actually works very well if I setup my connection through the PLEX connection settings.. but I still can't get it to work with the Android VPN setup.... (tested 3G and WiFi)
..also I cannot get the VPN to work with a Windows PC... tested a Mac (hackintosh) and it worked instantly...
so I think its a Mac thing maybe... Since PLEX is working... I am happy but would still like to get the VPN connection working properly. I suspect I'll need to call Apple about it though
I am also have a similar issue.
OSX Server running 10.6.8
L2TP VPN and PPTP services running
My iPhone and laptop can connect just fine. My HTC One X and HP Touchpad (CM9) can not. Both say the address can not be resolved. The server is sitting in the DMZ and if I enable the web server both devices can resolve to the default welcome page just fine.
1. It isn't a DNS issues since they can connect via the web
2. It isn't a port issue since other clients can connect
Is there some dumb setting i am missing in the VPN setup?
Thanks
Will
OSX Lion Server L2TP VPN and ICS not working
Hey guys.. I got PPTP to work to OSX Lion Server by making sure PPTP, L2TP, and IPSec forwarding were enabled through my router.
Also, make sure to check the VPN logs in /var/log/ppp/vpnd.log to see why it's not connecting..

Android VPN + Tethering

I use Android's native PPTP VPN connection to manage computers at my office or at my home if I need to do something when I'm not physically present.. If my phone is connected to the VPN however, and I tether my internet connection to my tablet, I can't seem to get access unless I make a second VPN connection from my tablet.
Does anybody know how to share VPN access to tethered devices? I'm sure its possible, just not sure how to make it happen...
possible solution see cross-link
See http://forum.xda-developers.com/showpost.php?p=33749904&postcount=10
And why are you trying to do that?
I haven't tested vpn "sharing" , but it is simple to vpn with the tethered device to the vpn server. Wifi tether passes the vpn traffic fine.
I will poke around with it sometime.
Sent from my ADR6425LVW using Tapatalk 2

Reverse Usb Tethering with VPN to Bypass Internet Censorship

I have a big problem and after many days I can't find any solution because I'm not Linux experienced user...
So, I'm using USB [Reverse] Tether (Windows share internet with phone via USB cable) everything working ok (dns, http browser, etc...)
BUT all VPN apps doesn't! when I try to make VPN connection, it said "waiting for usable connection..." in notification and never be connect
I'm using xposed with "Hack Connectivity Service" and "Fake WiFi Connection" modules and I'm sure need some rule in iptable.
I need two successful configs:
1) route any VPN traffic throw "rndis0" adapter to establish VPN tunnel (tun0 interface)
2) route other app's traffic throw tun0 interface for bypass internet censorship
See this: http://www.axgig.com/images/83237693943488625952.gif
Thank you!

[q]using usb tether for home network

Hello friends,
I've been researching how to fix my problem for a few days and I'm in dire need of some direction. I am getting quite frustrated. So I have my phone tethered to an older laptop via usb pdanet+ and everything is working fine. But what I want to do is broadcast that connection through a wireless router and connect my other devices that way. I know of wifi tethering on android and connectify for laptop but I do not want to go that route. What is it I need to do? I've tried using windows internet sharing through ethernet and disabling dhcp. Running out of ideas...
A couple of options...
1. Hosted Network Starter
Free: Simple hostpot with non configurable DHCP
www.nirsoft.net/utils/wifi_hotspot_starter.html
2. Connectify
Paid: Full featured hotspot with static DHCP feature
http://www.connectify.me/

Categories

Resources