Looking at my router logs, both my Samsung Note 2 and Note Pro 12.2 LTE (stock, not rooted) are making DNS calls to Google's DNS servers at 8.8.8.8 and 8.8.4.4 several times a minute. Neither of those servers are in my DHCP configuration, so I'm guessing something has these hard coded. Local port numbers change with each call. Our Xoom and HTC Photon 4G are not doing this, despite running many of the same applications.
I used a no-root firewall on the Note Pro which uses VPN to track activity, but it doesn't show this, and even application network traffic doesn't seem to correlate to when the Google DNS calls are made, so I'm guessing it's a system process of some kind?
Has anyone else observed this? It's more just annoying, than anything else.
Thanks for any insights!
eric
ericbergan said:
Looking at my router logs, both my Samsung Note 2 and Note Pro 12.2 LTE (stock, not rooted) are making DNS calls to Google's DNS servers at 8.8.8.8 and 8.8.4.4 several times a minute. Neither of those servers are in my DHCP configuration, so I'm guessing something has these hard coded. Local port numbers change with each call. Our Xoom and HTC Photon 4G are not doing this, despite running many of the same applications.
I used a no-root firewall on the Note Pro which uses VPN to track activity, but it doesn't show this, and even application network traffic doesn't seem to correlate to when the Google DNS calls are made, so I'm guessing it's a system process of some kind?
Has anyone else observed this? It's more just annoying, than anything else.
Thanks for any insights!
eric
Click to expand...
Click to collapse
Hi Eric, not too sure if you got your answer already. i am on RR kitkat ROM (SGS2), i had a related issue in that it has hard coded 8.8.8.8 as DNS and as a result, i can not use most open/free wifi, the authentication/term and condition page will not come up...
with some research, i found that in /system/etc/dhcpcd/dhcpcd-hooks/, there is this file called 20-dns.conf, in there, you may find there are 2 line similar to this
setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4
if you delete/comment this out, and reboot the device, it should work hopefully. that is how i fixed mine anyway. let me know if you still stuck.
cheers.
d8d8up said:
Hi Eric, not too sure if you got your answer already. i am on RR kitkat ROM (SGS2), i had a related issue in that it has hard coded 8.8.8.8 as DNS and as a result, i can not use most open/free wifi, the authentication/term and condition page will not come up...
with some research, i found that in /system/etc/dhcpcd/dhcpcd-hooks/, there is this file called 20-dns.conf, in there, you may find there are 2 line similar to this
setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4
if you delete/comment this out, and reboot the device, it should work hopefully. that is how i fixed mine anyway. let me know if you still stuck.
cheers.
Click to expand...
Click to collapse
just to show the whole picture so someone else can save a bit of running around, here is a file very similar to the orginal 20-dns.conf note line 20 and 20, if you # it out, it should use the default gateway, or change it so it use one you prefer: ( this is copied from the github but i can not copy the like over due to new user restriction.)
# Set net.<iface>.dnsN properties that contain the
# DNS server addresses given by the DHCP server.
set_dns_props()
{
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${interface}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${interface}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4
}
unset_dns_props()
{
for i in 1 2 3 4; do
setprop dhcp.${interface}.dns${i} ""
done
}
case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT) set_dns_props;;
EXPIRE|FAIL|IPV4LL|RELEASE|STOP) unset_dns_props;;
esac
d8d8up said:
Hi Eric, not too sure if you got your answer already. i am on RR kitkat ROM (SGS2), i had a related issue in that it has hard coded 8.8.8.8 as DNS and as a result, i can not use most open/free wifi, the authentication/term and condition page will not come up...
with some research, i found that in /system/etc/dhcpcd/dhcpcd-hooks/, there is this file called 20-dns.conf, in there, you may find there are 2 line similar to this
setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4
if you delete/comment this out, and reboot the device, it should work hopefully. that is how i fixed mine anyway. let me know if you still stuck.
cheers.
Click to expand...
Click to collapse
Thanks for the pointer, but unfortunately that's not my issue. I checked the file, and there are no hard coded addresses.
I don't think it is at the system level - when I look at the network configuration, it is showing the correct DNS addresses to use. So I think it is one or more apps that have it hard coded. Since I'm only seeing it on my Samsung devices, I'm guessing it's one of theirs...
oh... weird indeed. when i was trying to fix mine at the very beginning, i went to the wifi set up and found it was using DHCP, i therefore assumed it had no custom DNS but the router address as the DNS, which would be good and normal for me. but when i run getprop net.dns1 via the terminal of the phone, it gave me the 8.8.8.8 address.which led to the file mentioned above...
Related
The problem on every Nexus One (or Android) build so far, is that everytime one switches between WiFi and 3g or vise versa, the DNS cache is not flushed. This could cause various problems. In my case, when I connect to our corporate WiFi, the exchange mail server resolves to a local ip address, eg 10.x.x.x. When I turn WiFi off and connect to 3g, the dns entry is not flushed, and therefore the mail client just times out trying to connect to the non reachable private ip.
There is already a bug report about this, but I was wondering if our gurus here could fix this anytime soon, since Google doesn't seem to care much (the report is over 2 months old).
There is an application in the market that flushes out the cache. It think its called "Cache Cleaner".
this is my solution
add this script to gscript lite
netprop net.dns1 8.8.8.8
netprop net.dns2 8.8.4.4
[email protected] said:
this is my solution
add this script to gscript lite
netprop net.dns1 8.8.8.8
netprop net.dns2 8.8.4.4
Click to expand...
Click to collapse
the app IP Manager could also be used
i have two IP profiles (home & office) and every time i leave either one of the two locations, i switch here (e.g. at home i need the private IP address, at office i need the assigned IP address, in both cases I want to have DNS1 8.8.8.8 and DNS2 8.8.4.4
more profiles can be set up, according to the requirement
[email protected] said:
this is my solution
add this script to gscript lite
netprop net.dns1 8.8.8.8
netprop net.dns2 8.8.4.4
Click to expand...
Click to collapse
What is netprop? Can't find it on CM5.0.4.1. Is it a command line tool?
Yeah, this has been bothering the tit out of me. When I used APNdroid, it was pretty terrible and I had to fiddle with wifi, plane mode, etc just to get EDGE back on.
I recall not having that problem when using Cyanogen's ROM, though. Maybe he's fixed it?
tamarian said:
What is netprop? Can't find it on CM5.0.4.1. Is it a command line tool?
Click to expand...
Click to collapse
sorry ^^
setprop
Thanks to jt1134 for some info he gave me, I've found how to enable custom DNS servers for the mobile connection. Since I figured others may want this as well, I'm posting Clockwork zips here for OpenDNS, Google, and the default settings. If people would like other DNS server options and don't feel like doing this themselves, I could easily make other zips as well.
See here for a reference on what needs to be changed if you want to do it yourself. With the OpenDNS option, you can go to www.internetbadguys.com after the change and it should display as a potential phishing site. Another option that can test any of the changes is http://myresolver.info/ and it will tell you what DNS server your device is using.
This should work for both DI01 and DJ05. If you wish to do modify the DNS info yourself, see here. Also, here is a snapshot to show that OpenDNS is working. Still working on a way to test out to verify Google's DNS servers.
UPDATES:
12/18 - Updated zips to resolve MMS issues
12/12 - Added Level3 DNS Servers, updated Google and OpenDNS packages to replace only "ip-up"
How would I do this on the Vibrant? I looked at the files that this pushes,and it has multiple references to CDMA,and from looking at vibrant roms,we don't have these files at all,all we have is ip-up vpn.
What exactly does this do and why would I need it? Not being rude, please tell a little more, I am courious
Sent from my SCH-I500 using XDA App
ryanf said:
What exactly does this do and why would I need it? Not being rude, please tell a little more, I am courious
Sent from my SCH-I500 using XDA App
Click to expand...
Click to collapse
its helpful when the dns servers in your area are laggy. you would notice this when you go to load a site,it will sit there for a few seconds then start loading pretty fast,this will switch over to using google's dns servers or opendns's server,both of which are faster than verizon's,which will reduce that time before the page starts loading. the dns server is what changes a site like www.google.com into their ip address,it needs to do this for any application to connect to the server. I want it on the vibrant because the tmobile dns server in my area goes down multiple times a week,it wont resolve any site names,but if I type in the ip address it starts loading instantly,same if tethered,it wont load anything,set windows to use google dns and it starts working perfectly.
Fantastic, I'm going to love this... flashing now!
msnuser111 said:
How would I do this on the Vibrant? I looked at the files that this pushes,and it has multiple references to CDMA,and from looking at vibrant roms,we don't have these files at all,all we have is ip-up vpn.
Click to expand...
Click to collapse
There are only two files that it's sending to the device, ip-up and ip-down. From what I read when trying to accomplish this initially, ip-up is run when your phone connects to the data network and ip-down runs when the connection is ended. I wanted to have the same DNS servers regardless, so I set it up to have it always set the DNS servers. Possibly a little more than is needed, and it may cause issues, but none that I've experienced yet.
If you (or anyone else) wants to accomplish this, look for the following lines in ip-up and change $DNS1 and $DNS2 to the servers you would like to use.
Code:
/system/bin/setprop "net.$NAME.dns1" "$DNS1"
/system/bin/setprop "net.$NAME.dns2" "$DNS2"
OpenDNS:
Code:
/system/bin/setprop "net.$NAME.dns1" "208.67.222.222"
/system/bin/setprop "net.$NAME.dns2" "$DNS1"
Google:
Code:
/system/bin/setprop "net.$NAME.dns1" "8.8.8.8"
/system/bin/setprop "net.$NAME.dns2" "$DNS1"
Level3:
Code:
/system/bin/setprop "net.$NAME.dns1" "4.2.2.1"
/system/bin/setprop "net.$NAME.dns2" "$DNS1"
Glad someone else likes this as well. I'm guessing with the latency associated with 2g/3g networks, that DNS lookup probably isn't the bottleneck. I wanted it more for reliability, url correction, and phishing/security protection than speed.
The speed since I changed to the google dns is amazing! Tether as well!
Simply Fascinating
imnuts said:
There are only two files that it's sending to the device, ip-up and ip-down. From what I read when trying to accomplish this initially, ip-up is run when your phone connects to the data network and ip-down runs when the connection is ended. I wanted to have the same DNS servers regardless, so I set it up to have it always set the DNS servers. Possibly a little more than is needed, and it may cause issues, but none that I've experienced yet.
If you (or anyone else) wants to accomplish this, look for the following lines in ip-up and change $DNS1 and $DNS2 to the servers you would like to use.
Code:
/system/bin/setprop "net.$NAME.dns1" "$DNS1"
/system/bin/setprop "net.$NAME.dns2" "$DNS2"
OpenDNS:
Code:
/system/bin/setprop "net.$NAME.dns1" "208.67.222.222"
/system/bin/setprop "net.$NAME.dns2" "208.67.220.220"
Google:
Code:
/system/bin/setprop "net.$NAME.dns1" "8.8.8.8"
/system/bin/setprop "net.$NAME.dns2" "8.8.4.4"
Glad someone else likes this as well. I'm guessing with the latency associated with 2g/3g networks, that DNS lookup probably isn't the bottleneck. I wanted it more for reliability, url correction, and phishing/security protection than speed.
Click to expand...
Click to collapse
yeah,for me dns definitely is the bottleneck,tmobiles dns server (or the tower by me) is broken and goes down about once a week,sometimes more than that. I can still connect to stuff by ip address,but dns resolution is useless,it times out after a few seconds.tethering is the same,but if I change my dns address in windows that makes it work,so I was looking for a way to do it in android too,I tried these files as is and they have no effect on the vibrant.
msnuser111 said:
yeah,for me dns definitely is the bottleneck,tmobiles dns server (or the tower by me) is broken and goes down about once a week,sometimes more than that. I can still connect to stuff by ip address,but dns resolution is useless,it times out after a few seconds.tethering is the same,but if I change my dns address in windows that makes it work,so I was looking for a way to do it in android too,I tried these files as is and they have no effect on the vibrant.
Click to expand...
Click to collapse
do we flash all three zips?
stevonyc35 said:
do we flash all three zips?
Click to expand...
Click to collapse
No, just the one that corresponds to which dns servers you want to use.
no just one of them.
Sent from my SCH-I500 using XDA App
Is OpenDNS actually working on VZW's 3G? I remember reading something somewhere that VZW was blocking OpenDNS for some reason.
Here it is:
http://www.dslreports.com/shownews/OpenDNS-Were-Being-Blocked-By-Verizon-Wireless-111530
geeknik said:
Is OpenDNS actually working on VZW's 3G? I remember reading something somewhere that VZW was blocking OpenDNS for some reason.
Here it is:
http://www.dslreports.com/shownews/OpenDNS-Were-Being-Blocked-By-Verizon-Wireless-111530
Click to expand...
Click to collapse
It seems to be working for me. When I put the OpenDNS settings on and went to internetbadguys.com, I got OpenDNS's phishing page. I also found a list of suspected/known phishing sites and went to a couple of those and also got OpenDNS's phishing site.
will this work on dj05 or does it matter?
ryanf said:
will this work on dj05 or does it matter?
Click to expand...
Click to collapse
It shouldn't matter works fine for me
Sent from my SCH-I500 using XDA App
I've updated the first post. There is now a screenshot of OpenDNS at work. I've also updated the packages to replace just /system/etc/ppp/ip-up rather than both /system/etc/ppp/ip-up and /system/etc/ppp/ip-down. I found one more public dns server from Level3 that I've also created a package for if people want it.
Should we flash back to default then reflash the mod? Why the change between doing both to now only doing the ip up?
Sent from my Fascinate via Tapatalk.
mastamoon said:
Should we flash back to default then reflash the mod? Why the change between doing both to now only doing the ip up?
Sent from my Fascinate via Tapatalk.
Click to expand...
Click to collapse
You shouldn't have to, but you could. I decided to change it since it's only really needed for ip-up. I don't know fully how Android handles switching between 3G and wifi, but that is the only time I could see an issue arising, mainly if connecting to a corporate network or potentially a free wifi hotspot (hotel, cafe, or similar). Think of places that may have restrictions in place on browsing or a TOS agreement before use, and that would be a place were a potential issue could arise. If you have an issue, then I would try going back to the default and trying one of the new packages, otherwise, I'd just leave it as is.
Thanks for this! The Google package does work over 3G, but not over Wi-Fi.
You can test any DNS resolver by going to http://myresolver.info. There, you can see your resolver's IP address (and click the ? to find out who the IP belongs to).
Over 3G, the resolver is Google. Over Wi-Fi, though, it's my ISP. And it's definitely a phone thing, because over the same Wi-Fi connection my PC using Google's DNS shows Google's resolver.
Falcyn said:
Over 3G, the resolver is Google. Over Wi-Fi, though, it's my ISP. And it's definitely a phone thing, because over the same Wi-Fi connection my PC using Google's DNS shows Google's resolver.
Click to expand...
Click to collapse
You should be able to set what DNS servers you want somewhere for WiFi as well, but I can't find how right now. If I do figure it out, I'll be sure to post back as well as update the first post on how to do so.
Hello to all.
I was trying to start this thread in Android Software and Hacking General, but got a warning about not having enough posts to submit a thread there, so I'm going to try here.
I have a Samsung Galaxy S II phone with the newest Android version. My goal is to modify the system so that 3G and WiFi are able to run together, side-by-side, simultaneously without 3G being turned off. Now, every time I connect to a WLAN, 3G cuts.
[OK, the spam police won't let me post outside links; Google Mobisocial 3G Wifi Stanford to find the article I'm talking about.]
MobiSocial News wrote about a hack that modifies ConnectivityService.java in a rather crude way, but according to the author of that article, it works on a 2.x Android system. There's not much info about the hack, but it's at least something and sounds plausible.
I tried to follow the instructions; I downloaded newest Android source codes, modified ConnectivityService.java and built the kernel by following these instructions: [a link to source.android.com "Building the System"]. But unfortunately, make didn't produce a services.jar mentioned in the article.
---
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Every piece of information is valuable, so don't be afraid to post. Thanks!
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
I want to do the same with you
Cherilee said:
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
Click to expand...
Click to collapse
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Moonguy75 said:
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Click to expand...
Click to collapse
And why they say that it works?
Cherilee said:
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Click to expand...
Click to collapse
It's possible with a rooted phone.
cboursinos said:
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
Click to expand...
Click to collapse
Read here:
http://forum.xda-developers.com/showthread.php?t=2197776
Moonguy75 said:
No it is not possible.
Click to expand...
Click to collapse
Actually it is, I found this thread that describes how to do it on an optimus G phone, and based on that I was able to do in on vanilla android 4.3 as well (my rooted nexus 4).
You need to put a couple of scripts together, since you need a series of shell commands for turning this on and off, I recommend the wonderful SH Script Runner for this.
Here is what I did on my Nexus 4. It works perfectly but note that you don't actually see the wifi icon turning on, but if you run "netcfg | grep UP" you will see that the wlan0 interface is up and running (as well as the rmnet_usb0 mobile data interface, both of them will be up and will have the expected IP addresses) and you can access your local LAN while your mobile data 3g/4g whatever provides your default route to the outside world.
Code:
# enable dual-networking:
pkill dhcpcd
svc wifi disable
svc data enable
netcfg wlan0 up
cd /data/misc/wifi/.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
dhcpcd wlan0
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
pkill dhcpcd
pkill wpa_supplicant
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Sent from my MI 2 using Tapatalk
wlh03212 said:
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Click to expand...
Click to collapse
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
sordna said:
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
Click to expand...
Click to collapse
Hi I'm running on Miui v5 4.1.1
I did try the above commands. But I'm not sure about the ip route you mentioned in the coding x. X. X. X via y. Y. Y. Y.
The response of the script was permission denied. I am definitely rooted and I gave permission to SH script runner.
Sent from my MI 2 using Tapatalk
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
sordna said:
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
Click to expand...
Click to collapse
Thanks you for your reply. First of all my understanding of networking isn't anywhere basic . What i did with the xxx was replacing it with the internal ip assigned to me, aka 192.x.x.x
For the yyy, I replaced it with the ip of 3g connection. Not sure what I am doing here. Please guide me here (I know the su part which I an required to do in terminal)
And finally my goal. I have Seagate wireless plus and itself is a portable wifi hotspot to its own content. I am able to stream pictures music and video from the battery operated hardisk. I can bridge the connection of the portable hotspot to my home wifi gaining xs to the Internet.
However while I am connected to the Seagate wireless plus, I cannot connect to my 3g. That meaning I can't have Internet on the go which is a very big limitation.
Sent from my MI 2 using Tapatalk
Sent from my MI 2 using Tapatalk
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
sordna said:
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
Click to expand...
Click to collapse
# enable dual-networking:
............
............
.............
..........
...........
..............
..........
ip route add x.x.x.x via x.x.x.y # add any desired local route -------->( do i remove this row of code entirely? What do i do with this row of coding? Provide my default gateway? I'm not sure what's my default gateway or how i do find out my default gateway or how should i edit this coding to my default gateway.)
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well (In short if the i execute the above commands correctly with the correct default gateway of my 3G, the netcfg command should show my default gateway correctly? is my understanding correct?)
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
sordna said:
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
Click to expand...
Click to collapse
Thanks you much! Going to try out when I get home.
Sent from my MI 2 using Tapatalk
OK. Please hit the thanks buttons
sordna said:
OK. Please hit the thanks buttons
Click to expand...
Click to collapse
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
wlh03212 said:
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
Click to expand...
Click to collapse
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
sordna said:
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
Click to expand...
Click to collapse
Yes. I notice that the wifi switched off and then turns on again. Alright I do some research on my own! Thanks again.
Hope that I will get some breakthrough soon
Sent from my MI 2 using Tapatalk
Hi
I finally got it working. When I am connected to seagate wireless, I have to fiddle with the connection settings inside wifi settings. I assigned a static ip and assigned the gateway to 0.0.0.0
As for the ip, I set a different internal ip with the last digit increased by one. Example 172.25.0.2
Now I am connected to both 3G and LAN.
Sent from my iPhone using Tapatalk
I mean this is stupid... you can have IPv6 APN and everything, but on WIFI you cant get IPv6 address... I have dualstack LAN at home, every client should get local IPv4 address and public IPv6. But for some silly reason Google decided to not include this in to ICS, but since there is support for UMTS IPv6 APNs it should WORK technically... This works flawlessly on iPhone4S and other clients (read computers) that supports IPv6 on my LAN...
From what I can see, ICS manages to configure a IPv6 global address on its wlan0 interface via autoconfiguration.
Looking at results from tcpdump and other command line tools, there seem to be two other problems:
1) Even though there is a router on the LAN sending router advertisements and the device configures its address, it does not seem to install or use the the default gateway. I am able to ping the phone via IPv6 on the same local /64 global, and its link local, and am able to ping those devices back from the device (ping6 via busybox). I cannot however ping past the local IPv6 global network.
2) None of the web browsers on the phone I have tried seem to be doing AAAA lookups. Confirmed tcpdump, even when trying to resolve names that only have AAAA records, the request only ever goes out for an A record and never a AAAA.
I was able to run a web server on the same local /64 the phone was configured on, and was able to browse to it by its IPv6 address directly through the browser. So it does work, just missing the default route and AAAA DNS functionality it seems.
As an FYI this was tested on a rooted Galaxy S3 SGH-I747M running 4.0.4. I'm assuming the IPv6 functionality wouldn't be any different between this and the SII, but maybe I'm wrong.
themikea said:
1) Even though there is a router on the LAN sending router advertisements and the device configures its address, it does not seem to install or use the the default gateway. I am able to ping the phone via IPv6 on the same local /64 global, and its link local, and am able to ping those devices back from the device (ping6 via busybox). I cannot however ping past the local IPv6 global network.
Click to expand...
Click to collapse
I have a Galaxy S3 SPH-L710 running Android 4.0.4, and I had the same problem with it not configuring the default IPv6 route. There is a sysctl variable that controls whether the Linux kernel automatically adds the default route advertised in the IPv6 Router Advertisement messages, and it defaults to 0 (off) on the phone. Look at /proc/sys/net/ipv6/conf/default/accept_ra_defrtr.
themikea said:
2) None of the web browsers on the phone I have tried seem to be doing AAAA lookups. Confirmed tcpdump, even when trying to resolve names that only have AAAA records, the request only ever goes out for an A record and never a AAAA.
Click to expand...
Click to collapse
When I set accept_ra_defrtr to 1 and cycled my Wi-Fi connection, it came back up and added the default IPv6 route. Now test-ipv6.com on my phone gives me a 10/10 on both IPv4 and IPv6, meaning the DNS resolver is asking for AAAA records too and even preferring them when a host has both A and AAAA, which is the recommended and desired behavior. Loading comcast6.net on my phone shows my IP address as an IPv6 address.
Trouble is, setting sysctl variables in /proc/sys will not survive through a reboot, and there is no /etc/sysctl.conf on Android, so I don't know where to stash this setting so it gets applied on every boot. There is no file anywhere in /system that contains "accept_ra_defrtr" except for the vpnclient.ko kernel module, and that's not loaded, so I'd guess the kernel has been modified to disable IPv6 default routes by default.
Any idea if there's an Android equivalent of inittab or sysctl.conf or how might I go about setting that sysctl variable automatically on boot?
whitslack said:
I have a Galaxy S3 SPH-L710 running Android 4.0.4, and I had the same problem with it not configuring the default IPv6 route. There is a sysctl variable that controls whether the Linux kernel automatically adds the default route advertised in the IPv6 Router Advertisement messages, and it defaults to 0 (off) on the phone. Look at /proc/sys/net/ipv6/conf/default/accept_ra_defrtr.
When I set accept_ra_defrtr to 1 and cycled my Wi-Fi connection, it came back up and added the default IPv6 route. Now test-ipv6.com on my phone gives me a 10/10 on both IPv4 and IPv6, meaning the DNS resolver is asking for AAAA records too and even preferring them when a host has both A and AAAA, which is the recommended and desired behavior. Loading comcast6.net on my phone shows my IP address as an IPv6 address.
Trouble is, setting sysctl variables in /proc/sys will not survive through a reboot, and there is no /etc/sysctl.conf on Android, so I don't know where to stash this setting so it gets applied on every boot. There is no file anywhere in /system that contains "accept_ra_defrtr" except for the vpnclient.ko kernel module, and that's not loaded, so I'd guess the kernel has been modified to disable IPv6 default routes by default.
Any idea if there's an Android equivalent of inittab or sysctl.conf or how might I go about setting that sysctl variable automatically on boot?
Click to expand...
Click to collapse
bro look at your /system/etc/init.d. if it exists, you can add a new script as
#!/system/bin/sh
echo 1>/sys/XXXXXXX
in init.d and name it 89enipv6 or sth.
if it don't work, check your /system/bin/sysinit. if it doesn't exist, google and copy one.
Does anyone know how I can disable IPV6 on my S3 ?
ahoslc said:
Does anyone know how I can disable IPV6 on my S3 ?
Click to expand...
Click to collapse
Why do you want to disable IPv6? It's new better version of IP protocol and should be used whenever it possible.
runapp said:
bro look at your /system/etc/init.d. if it exists, you can add a new script as
#!/system/bin/sh
echo 1>/sys/XXXXXXX
in init.d and name it 89enipv6 or sth.
if it don't work, check your /system/bin/sysinit. if it doesn't exist, google and copy one.
Click to expand...
Click to collapse
In my case of 4.1.3 the value of 0 rewrited in /proc/sys/net/ipv6/conf/wlan0/accept_ra_deftrt on every wifi interface restart, even independently on "all"/"default" values.
Hi All,
I don't know if it is the proper thread for this, but I've installed a local webserver (CentOS) with BIND9 dns (named) and what is annoying me that my android devices don't resolve the server address. They can only connect through the IP of the server.
Windows pc and iOS devices do resolve the server name.
Devices connect to the server through a wireless AP that is also a DHCP. DNS address is distributed through the AP's DHCP.
Any ideas? Or any workaround for this? The main goal is to reach the local server by its name, so if you guys know an app other than a DNS server I would be grateful for some help.
Thanks a lot
Greg
did you use static ip address and custom dns in advance settings on your android handset? if yes your android should lookup for dns server. anyway maybe, i could be wrong, port 53 is being used for other apps or closed in iptables on your android hanset.
cheers hope it could help
vertrag said:
did you use static ip address and custom dns in advance settings on your android handset? if yes your android should lookup for dns server. anyway maybe, i could be wrong, port 53 is being used for other apps or closed in iptables on your android hanset.
cheers hope it could help
Click to expand...
Click to collapse
Thanks for the quick reply.
The ROM I use is one of Ficeto's base ROM. I9100XXLPQ with supercore kernel. The thing is, in advanced wifi configurations I don't have the possibility to set DNS. DNS information is not even displayed. I only see the IP and I don't have the possiblity to edit it neither. It is something that should be available in all roms or is it just my current rom?
I have no idea if there is something that uses the port 53, but when I connect to my DSL router I can browse the internet. So I assume the DNS in this case should work correctly.
Thanks a lot
Greg
Someone, move this question to Q&A thread..
yes if ur able to browse di internet normally then the dns query look up is fine.. what i nean by port 53 is the port that dns server and client use to communicate each other. take a look of my screenshot im able to change the dns..
Sorry for having posted in the wrong thread.
Well I don't have the same settings available in my current ROM. But I installed a third party app from Play to set the DNS and even if it is displayed correctly in the 3rd party app settings, it doesn't resolve the server's address.
I guess there is nothing else left but to use a packet sniffer (wireshark) to see whats going on between the android's browser and the server.
Will get back with the results.
Thanks
Greg
Greg767 said:
Sorry for having posted in the wrong thread.
Well I don't have the same settings available in my current ROM. But I installed a third party app from Play to set the DNS and even if it is displayed correctly in the 3rd party app settings, it doesn't resolve the server's address.
I guess there is nothing else left but to use a packet sniffer (wireshark) to see whats going on between the android's browser and the server.
Will get back with the results.
Thanks
Greg
Click to expand...
Click to collapse
Did you check the value of property net.dns1? If not just enter
Code:
getprop | grep net.dns
in an ADB shell. The value of the property net.dns1 should be set to the IP address of your DNS server.
If this is not the case just enter
Code:
setprop net.dns1 <your DNS server IP address>
for testing and try to ping one of your internal servers by name. It should work now.
Hi all,
Problem is solved. On a local network you must define the gateway in the DHCP so that the android device sends both IPv6 and IPv4 queries to the DNS server. If it is not defined it sends only IPv6 queries and doesn't fall back to IPv4 when that fails.
Thanks for your help
Greg