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
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.
Hey peeps. I'm on Andromeda 3 and I have been plagued lately by a very odd wireless issue that I cannot seem to fix. My symptoms will replicate no matter which wireless network that I connect to.
First off, I am an IT guy so I am very savvy. Secondly, I have been developing a theme on this phone so that may be related, but unlikely.
Some information on my setup:
In my home I have a Cisco Aironet 1200 802.11g access point that I am using for wifi behind a Cisco PIX 501 router.
At work we use Extreme Networks (enterprise grade) wireless access points with Juniper firewalls/routers/switches. I do not recall model numbers (irrelevant).
The problem:
Issue #1 - When I turn on wifi my signal bounces between 0 and 1 bar, and occasionally if the sun and moon are in the perfect positions in orbit, I will get 2 bars (wifi, not cell signal).
Issue #2 - I cannot for the life of me get a new IP address from DHCP on either network! My IP address on eth0 is stuck at 10.x.x.x but my home IP scheme is 192.168.0.x
My phone is set on DHCP, not static so I have no clue why it's binding to that address.
I have tried terminal emulator to release and renew but it doesnt work and I just end up getting an error that says DHCP timed out. Im not sure how far Android commands differ from Debian but I have tried (without success),
ifconfig eth0 down & up
netcfg eth0 down & up
dhclient (not recognized)
Other than that my host file is clogged up with a bunch of crap that I'm guessing by the ROM dev for disabling ad's.
I have even reflashed the ROM but that didn't help.
Can anyone suggest other things I can try to get that IP to unbind? The eth0 settings have to be stored away on some conf file somewhere right? I just dont where to look.
Thanks way in advance!
I have had issues with wi-fi connectivity with Andromeda 3 as well. I have found that for me, either rebooting the phone or using the power button menu to switch to airplane mode for a minute or so and then turning airplane mode off again fixes it for me - until the next time. Otherwise, I am sorry that I do not have better suggestions.
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.
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
Where to start, ok i have a note 5 tmob with stock rom rooted and posiden kernel and latest firmware. I have been tweaking the system for securty. Vpn af+wall adaway ect...
I also use a wireless sniffer called wicap 2 for keeping tabs on my internet.
So to my point or maybe problem. I was sitting with my daughter showing her some security issues to watch out for namely the difference between http and https. So while i showed her what happens if i log in to a site without https and my sniffer running i caught my fake log in and showed her. Then commenced to have her do that to on her phone.
Thats when the problem popped up. I did not catch her traffic.
I looked into my firewall and iptables. I noticed my wlan did not seem right
"wlan0 Link encap:Ethernet HWaddr EC:1F:72:EF:BE:21
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask: 255.255.255.0"
My log on my sniffer says my wlan0 address is 192.168.0.5/255.255.255.0 aswell.
Now my router is ip address 192.168.0.1 and my phone is the one that ends with the "5". Shouldn't my iptables look at my router ip and the go up. Instead of starting at "5" from my phone ip and missing the first 3 ip addresses while sniffing.
Now if this is not right how do i change this. Thanks in advance and i hope i have put enough info.
I do not know the program but sniffing works in one of two ways on your phone it can set up a vpn and see everything but for another phone the network card needs to be set into promiscuous mode to see packets not designated for you this means the proper network card. So it would seem that you are sniffing only your own network packets. And DHCP is not affected at all the numbers do go up but by sniffing you are seeing all network traffic.