Hey there,
I would like to use reverse tethering over my usb cable.
Before I start I'll let you know my setup:
Windows 7 x64 machine, sdk (inc. adb) installed but adb seems to make problems
i9000 running infinitum 2.1 with devil2 v0.72
These are the steps I used:
-connect the phone
-activate usb-tethering on the phone
-PC: change the ip on the new network adapter to 192.168.2.1
-PC: set my local area connection to share my internet connection with the new network adapter
-PC: add http service to the shared internet services
-open terminal on the phone
-executing the following commands:
Code:
ifconfig rndis0 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev rndis0
iptables -F
iptables -F -t nat
setprop net.dns1 78.42.43.62
setprop "net.gprs.http-proxy" ""
Funny part is: I can't ping a domain like google.de also no app is able to access the internet... BUT I can ping 173.194.35.151 (google.de ip afaik?!).
So I DO have a connection... somehow (tested with WiFi off and mobile data off) but no app has access and it can't resolve any domain names?!
78.42.43.62 is the correct ip for my dns provider!
Here are two screenshots proving what I'm talking about: Screen1 Screen2
So what can I do? Can some1 help me out here?
EDIT: I just wanted to point out that normal tethering IS WORKING, I do have a stable connection to my phone (even when transfering data), drivers are working!
Read the following post.. maybe it'll help you
Reverse Tethering
Related
I finally connected my Touch Pro2 to my netbook running Kubuntu 9.10 via Bluetooth for Internet access and thought I would share. (for the two other guys running a Windows phone with a Linux machine, right?) There is a lot of stuff on the net, tried half of it, and eventually just figured it out on my own. Maybe I am just crap with Google. I don't see any reason why this wouldn't work with any other phone with the same Bluetooth stack as the TP2. (HD, etc?)
LAPTOP
Get KBluetooth running if it's not already (bluetooth tray icon)
Right click KBluetooth for the menu, you want Settings -> Bluetooth Adapters
Set the mode to discoverable. If you want to change the name, do so, but then exit and restart KBluetooth. (otherwise the settings don't seem to take effect)
PHONE
Turn Bluetooth on if it's not already, then go into the Bluetooth menus via Comm Manager.
Tap "Add a device" and add the laptop. Enter a PIN.
LAPTOP
Enter the PIN when the box pops up.
Set the discovery mode back to hidden.
Now go into the KBluetooth device manager and set the phone to trusted. (this probably isn't necessary but I did it)
(this part onwards you need to do every time you connect)
PHONE
Go to the 2nd tab in the Bluetooth menus (the list of devices) and tap the laptop. You should now see Bluetooth Networking. Give this a tap.
After a few seconds you will get a drop down box. Set this to "Share Internet connection" then press Continue at the bottom left.
Now you select the GPRS connection you want to use. Again press Continue when done.
You should get a yellow notification at the bottom of the screen saying connecting, then after a few seconds a screen with the laptop's name and MAC address.
LAPTOP
Now open a Konsole and run this command:
Code:
sudo dhclient bnep0
If it worked you will see something like this at the end:
Code:
bound to 192.168.0.102 -- renewal in 120808 seconds.
You should now be connected to the Internet
you can also use wi-fi router to connect.
Code:
iwconfig wlan0 mode ad-hoc essid wificonnection key 1234567890
ifconfig wlan0 up
dhcpcd wlan0
wlan0 is your computers wifi interface your might be different
mode ad-hoc turns the connection into ad-hoc mode
essid wificonnection - is the network name in this example wificonnection
key is whatever 10 digit wep key you assign the connection 1234567890 in this example
*the dhcpcd wlan0 line in the scrip assumes you are using dhcpcd change it to dhclient if you are using dhclient instead.
the above script should work with most distros of linux. make sure wifi-router is running before you run the script on your computer.
to connect using usb tethering you can use
Code:
modprobe cdc_ether
modprobe rndis_host
ifconfig eth1 up
dhcpcd eth1
make sure rndis_host cdc_ether and all required packages and dependencies are installed. i had it set up a long time ago dont remember the the exact packages needed to make this work. again your network interface might differ (eth1,eth2,ethX) and dhclient if your using dhclient instead of dhcpcd.
These are the two scripts i use to tether to my netbook running Arch Linux and Gentoo but should work for most linux distros.
I'm trying to use my G1 to allow my laptop access my employer's VPN (PPTP) and can't make it work. There's a defect logged with android-wifi-tether so apparently I'm not the only one having this problem. I've tried the USB tether built into cyanogenmod and can't get in that way either.
Anyone have any ideas or personal success? Anyone want to confirm that I just can't do what I'm trying to?
thanks,
--e
I believe that the correct approach is to have the phone itself NOT part of the VPN, tether the computer to the internet via the phone, and initiate the VPN from the computer itself.
Is that what you are trying? Or are you trying to VPN the phone and just tether?
i was able to get on vpn network though wired tether ..i have super d1.8..not sure why you cant.
Thanks much for the replies, I really appreciate it.
I haven't tried logging into the VPN with the phone itself because I didn't figure that would get my laptop on the VPN (though I could try that).
I am connecting to the internet using the phone either as a modem (USB tether) or an ad-hoc network (android-wifi-tether) and the internet works beautifully except that I'm not able to log into the VPN.
I'm getting an error 721 and my android-ignorant IT geek is grumbling about GRE and NAT and blocked ports and goodness knows what else.
rshemeld - what method are you using to tether? do you know if your VPN is using PPTP?
Thanks!
--eric
Hey there!
I'm not a VPN pro, but PPTP error 721 generally means that GRE is being blocked somewhere along the line. This could be the router (in this case your phone) or an upstream router (your wireless providers router). One way to test is to connect to the VPN with the phones built-in PPTP client like someone suggested, that would at least narrow down the problem.
If the problem turns out to be that your phone is blocking the GRE packets then you'd need to port forward port 1723 on the phone to your local machine and also protocol forward (note that this is a protocol forward, not a port forward) protocol 47, which is GRE.
EDIT:
iptables -t nat -i your_radio -p tcp --dport 1723 -j DNAT --to your_computer
iptables -t nat -i your_radio -p 47 -j DNAT --to your_computer
Click to expand...
Click to collapse
EDIT2:
Ignore the above code, its for setting up a server behind your NAT not letting a PPTP client through the NAT. Not sure what I was thinking.
--e said:
I'm getting an error 721 and my android-ignorant IT geek is grumbling about GRE and NAT and blocked ports and goodness knows what else.
Click to expand...
Click to collapse
I wouldn't expect much help from a windoze-monkey-button-pusher. They don't include brains in those.
ivanfilippov said:
Hey there!
I'm not a VPN pro, but PPTP error 721 generally means that GRE is being blocked somewhere along the line. This could be the router (in this case your phone) or an upstream router (your wireless providers router). One way to test is to connect to the VPN with the phones built-in PPTP client like someone suggested, that would at least narrow down the problem.
If the problem turns out to be that your phone is blocking the GRE packets then you'd need to port forward port 1723 on the phone to your local machine and also protocol forward (note that this is a protocol forward, not a port forward) protocol 47, which is GRE.
EDIT:
Click to expand...
Click to collapse
Wow, I'm your new biggest fan. I'll get the VPN info from my geeks and verify that the phone itself can get on (I suspect it'll be able to).
The code you posted, do I enter that in the terminal application on the phone? Or should I boot to Aman-Ra and use that terminal?
Thanks for your patience and your help, everyone.
--eric
lbcoder said:
I wouldn't expect much help from a windoze-monkey-button-pusher. They don't include brains in those.
Click to expand...
Click to collapse
lol, he means well
Yeah i set a profile up first(on my PC) i am not using the vpn client/rsa token.
Hey!
Yep put that in your phone terminal. I'll see if I can get a more concrete example for you.
EDIT:
Oops, my iptables lines were totally wrong, ignore those. I just did some testing and realized what I posted was not set up for what you needed. Let me try a couple things here with my PPTP and I'll let you know how it goes.
EDIT2:
I've tried a couple ways and I'm not able to connect to both of my PPTP servers directly from my phone (I'm guessing this is Rogers' doing, or a big blunder on my part), so I can't help with too much more troubleshooting, but try getting on your PPTP server with just your phone and if that works. If it does then you can most likely get on it with your laptop behind your phone. You might not even need any iptables rules, but like I said I can't really test it for you. Good luck.
Solution, see cross link
See http://forum.xda-developers.com/showpost.php?p=33749904&postcount=10
great forum - hope this is the right place to ask this question
New to android and smart phones but doing it up with my new Nexus One on stock froyo ROM.
My work network has some issues including erroneous DHCP addresses being dished up in the wrong 192.168... range (old office infrastructure fix for the problem is someone else's gig).
I want to do a /release /renew on my Nexus One to pick up a legit ip address (on our windoze machines we just do the ipconfig /release /renew).
Is there an equivalent for this phone and Android? I have searched around and picked up a couple of network stat apps but they don't have the release/renew. Sure I can keep rebooting or killing WiFi and reconnecting but would like to know if there is a better way.
thanks!
Instead of trying to band-aid a problem, you should just fix the existing DHCP issue.
Seriously, DHCP is one of the simplest protocols to set up. Take 10 minutes, track down the range issue, correct it, and never worry about it again.
If I understand it correctly, you're looking for "netcfg eth0 dhcp" command, or possibly:
"netcfg eth0 down"
"netcfg eth0 up"
"netcfg eth0 dhcp"
Jack_R1 said:
If I understand it correctly, you're looking for "netcfg eth0 dhcp" command, or possibly:
"netcfg eth0 down"
"netcfg eth0 up"
"netcfg eth0 dhcp"
Click to expand...
Click to collapse
Jack, I tried those commands, and on the last one I got this:
action 'dhcp' failed (No such process)
Also, if I just run netcfg between down and up, it seems like eth0 is never disabling properly. I am in superuser mode.
Any hints?
try netcfg alone
Andresehn said:
Jack, I tried those commands, and on the last one I got this:
action 'dhcp' failed (No such process)
Also, if I just run netcfg between down and up, it seems like eth0 is never disabling properly. I am in superuser mode.
Any hints?
Click to expand...
Click to collapse
I just ran 'netcfg' alone and it turns out it's wlan0 instead of eth0.
To do a DHCP release and renew:
Fire up terminal emulator and type:
su
dhcpcd -k wlan0
dhcpcd -n wlan0
Turn wifi off/on and you'll get a new dhcp ip address rather than just a refresh on the existing one.
mickrick said:
To do a DHCP release and renew:
Fire up terminal emulator and type:
su
dhcpcd -k wlan0
dhcpcd -n wlan0
Turn wifi off/on and you'll get a new dhcp ip address rather than just a refresh on the existing one.
Click to expand...
Click to collapse
If it's a different interface, say eth1, you might need to run 'dhcpcd eth1' first. You can verify the DHCP configuration via 'getprop | grep dhcp'.
I'm trying to use a site on my LG stilo 3. The site keeps redirecting me an is saying Im using a proxy IP or VPN an I don't even know really what they are let alone how to use them. How do I set it so my IP doesn't hide when I try to use said site??? Please help!! Thank you
I'm using an XT862 on Telstra 850MHz 3G here in sunny Oz and can't get the tethering to work.
I've tried it with and without root and I'm now on the leaked update and still no joy.
The data connection is fine and I can browse on the phone directly both before starting the hotspot and after. My laptop or iPad both connect and get DHCP addresses but can't get any data.
Has anyone else got this working?
It works fine here in Germany, at least for me. I'm using stock tethering.
I have no idea why it doesn't work for you. Does DNS and ping work?
What output do you have with "ping google.de"?
Dns works using the phone as the dns server, any external dns server fails. Ping and http traffic all fail. When I start the connection, the 3G connection drops and reconnects. Skype disconnects then reconnects on the phone.
It's got me stumped. The sim worked in my Sony xperia play before it was in this phone.
So I got you right, from your laptop, DNS works but no ping?
Is your phone rooted? If yes, open a shell (with Connectbot or so) and type "iptables -t nat --list". Do you see the line with MASQUERADE?
Thats right. Dns works IF I use the phone as dns server. Ping never works from the laptop. Yes the phone is rooted.
Listing the Nat tables, the three are all blank. Pre route, output and post route all have no rules.
my d3 on TPG (Optus network) tethers fine
were you able to tether with your xperia play? it could possibly be telstra blocking tethering
NaVVy said:
Thats right. Dns works IF I use the phone as dns server. Ping never works from the laptop. Yes the phone is rooted.
Listing the Nat tables, the three are all blank. Pre route, output and post route all have no rules.
Click to expand...
Click to collapse
I think this is at least one reason it doesnt work. Can you try this command (after establishing tethering):
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
Before the d3, I could tether on my xperia and before that on my atrix.
It seems like the d3 isn't loading the Nat/routing tables properly. I haven't seen any network traffic return from the phone to the laptop except for dns from the phone. Even dns from other servers doesn't get through.
rweb said:
I think this is at least one reason it doesnt work. Can you try this command (after establishing tethering):
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
Click to expand...
Click to collapse
This seems to have worked. Web browsing from my iPad works. I'll check more tomorrow from my laptop but I wonder why it wasn't loading the correct tables itself?
NaVVy said:
I'll check more tomorrow from my laptop but I wonder why it wasn't loading the correct tables itself?
Click to expand...
Click to collapse
I have no idea. Most likely some bug, but I don't know why you are running into it while I don't.
I wonder if the iptables line disappears when you stop tethering (mine does). I don't think it hurts if not. If yes you have to re-enter the iptables command after each tethering. You could write a little script and create a widget for it with the App "Script Manager". It's at least a workaround.
So I've got two Wifi networks broadcasting on the one SSID, and unfortunately the Chromecast often connects to the wrong one with less signal strength. If you've rooted your Chromecast, you can change the wpa_supplicant settings directly to get it to connect to the right one.
This guide assumes you have busybox or other editing tools installed, as well as ssh access enabled.
SSH into your Chromecast
Code:
ssh [email protected]
Modify your wpa_supplicant.conf file, and add a bssid directive with the bssid of the access point you want it to connect to
Code:
busybox vi /data/wifi/wpa_supplicant.conf
Run
Code:
busybox killall -HUP wpa_supplicant
to reload the configuration
I've just discovered/tried this today, so I'll see how it pans out and I'm hoping it should improve my streaming performance.