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.
Related
Hi everyone,
I have a little problem that I don't know how to solve, nor diagnose as I lack some knowledge.
I have a linksys E3000 router. I installed one of the many Tomato firmware flavors that has bundled VPN server. I managed to configure the server, generated the keys ca,client etc. Everything seems to work fine from a PC. I also run the latest cyanogenmod nightly on my Hero. I managed to solve or let's say find out how to install the certificates onto the system (add the ca.crt, client.crt, client.key into a .pk12 openssl package). Then I used the default CM configuration assitant to configure the connection and it works, or at least it connects and I can see that the conection was succesful on my router GUI.
Now, the problem is that even if it says connected (a small key at status bar), I can't do anything, no web browsing, no android market connection, nothing that involves traffic. I don't know what is the problem, or how to diagnose, log or something. Any help would be apreciated.
Thank you.
My router vpn server configuration:
Interface Type TAP
Protocol UDP
Port 1194
Firewall Automatic
Authorization Mode TLS
Extra HMAC authorization (tls-auth) Disabled
Client address pool DHCP
--------------------------------
Direct clients to redirect Internet traffic (tick)
Encryption cipher Default
Manage Client-Specific Options (tick)
Allow Client<->Client (tick)
My HTC Hero configuration:
-Basic
Name (some i chose)
VPN server (a dyndns host, the router updates the ip automatically)
User authentication (unticked)
CA certificate (the pk12 file i created)
CLIENT certificate (the pk12 file i created)
DNS search domains (unchanged)
-Advanced:
Server port 1194
Protocol to use udp
Device to use tap
LZO compression (unticked)
Redirect gateway (ticked)
Remote Sets Adresses (ticked)
Local IP Adress (faded)
Remote IP Adress (faded)
Chipher algorithm default
Size of cipher key default
Extra arguments unchanged
I'm running a Piratebox web server on my phone - Does anyone know if there's a way to adjust DNS and re-direct everyone to my phones web server when they are tethering from my phone?
+1 to this question.
I am currently trying to find a way to get some android devices, which are working as AdHoc clients), and I want an app running on them to connect to a "server" address instead of using a specific, fixed IP address. I meant to do this programatically, by creating a socket to an InetAddress resolution of the "server" address. I assume InetAddress will use the DNS defined on the wireless interface to make this translation, but its Java, and that assumption really depends on the low level impl. of InetAddress.
So yeah, DNS redirect from the DNS server running on the AdHoc host, which by association also runs Wireless Tether for root users. How can we do it?
I have tried some redirections from the hosts file (zone file), location in "system/etc/hosts". My device, like many others, comes preloaded with a bunch of IP-hostname redirections, but these only seem to work locally, e.g.:
gugle.com redirects to 127.0.0.1 (in the hosts: "gugle.com 127.0.0.1")
If I input this address on the AdHoc host, gugle.com will redirect to my http port 80 landing (I have a web server running on the device to test this).
If I input this address on an AdHoc client, it doesnt return anything. I'm guessing the DNS server running on the host does not use the zone file from the OS.
So the question remains - where can we define a redirection from the DNS server that runs on the Wireless Tethering for root users device.
I'm using a Samsung Fascinate with AOKP Milestone 5 by Stephen.k.spear.
My second device is an Asus Transformer TF-101 running Megatron CM9 based ROM by ricardopvz.
I use WiFi Tether for Root that is no longer beta and available on the market so I have the newest version. My WiFi tether set up options that are pertinent to this post are as follows:
1. Change Device Profile
a. Samsung Galaxy Nexus (CDMA/LTE)
2. Change Setup Method
a. Netd (master)
3. Change LAN
a. 192.168.1.0/24
4. Routing Fix
a. Routing fix is NOT enabled
5. Default DNS settings
I have no issues tethering, it works very well, very fast. I can ping by hostname from each device while tethered. I have set both device name entries in the host file.
My issue while tethering: When I run netstat on the Transformer, I can see that wlan0 is listening on port 139(NetBIOS) and 445(SMB). However, when I netstat on the Fascinate, it is NOT listening to either of these ports. I use the Samba app available from the market and have configured all the appropriate settings for both devices.
Using the ip route command, I can see that both devices show appropriate routing on 192.168.1.x to the appropriate adapter (wlan0).
Why won't the Fascinate listen for the two ports when the adapter (wlan0) appears to be working fine, routing is good, pinging by NetBIOS name from the hosts file, and Samba is broadcasting NetBIOS and SMB?
My purpose for this post and the questions is to be able to perform wireless syncing between the two devices and a computer for various directories like Pictures and Documents. I want all three devices to be the same. If I go home and connect to WiFi the IP addresses will change and I will constantly have to adjust settings. I'm looking for a seamless option because I use tether almost as much as I use home WiFi.
I figured it out. WiFi Tether app creates a rule with iptables called wireless-tether. It's regenerated each time the app starts by using the tether.edify file in the app's data directory. If you edit the firewall rule it will default back after the app starts again. I have emailed the dev to see if they can allow some user options so the traffic can pass internally such as netbios and samba.
The default linux rules allow all traffic which is why netstat on the tablet passes netbios and smb. The tablet is connecting wirelessly with no changes to iptables.
Also, standard home wifi on the phone would also pass the traffic because no additional rules to the iptables are being made.
Hi, guys, here's my problem.
My Galaxy S2 using my own WiFi is unable to retrieve some content from web. This content is:
apps icons in Android Market,
Picasa images,
Accuweather forecasts
and some others.
Other devices using the same WiFi has no problems with it. S2 switched to other ISP than my WiFI also has no problems with it.
While trying to narrow possible causes I've picked an example image, which is problematic to my S2+WiFI combination:
https://lh3.ggpht.com/NpoJbnyQbI1kEIlrWhP_t7lj9lN519RkPB3mxQS2z6pTFjh01R3ISeyYnj4AccBSsQ=w788 (an icon of an app from Adroid Maret, remove space from url).
It won't open on my phone using WiFi, so I checked host availability. I've run on my phone following command:
Code:
[email protected]:/ $ ping lh3.ggpht.com
ping: unknown host lh3.ggpht.com
But on my PC using the very same WiFi:
Code:
C:\Users\Grzegorz>ping lh3.ggpht.com
Badanie photos-ugc.l.google.com [173.194.70.132] z 32 bajtami danych:
Odpowiedź z 173.194.70.132: bajtów=32 czas=27ms TTL=47
Odpowiedź z 173.194.70.132: bajtów=32 czas=25ms TTL=47
I'm stuck, what should I do now?
Have you any ad blockers or DNS stuff running ???
jje
Nope, it's clean Android 4.0.3.
Echo request for lh3.ggpht.com on your phone does not work. On your PC you get a response from 173.194.70.132. Just to make sure your problem is related to DNS (and not to some lower service): did you try to ping the IP address 173.194.70.132 from your phone? Do you get a response?
Yes, the host is reachable from phone using IP dot address, only name resolving does not work.
Ok, looks definitely like some DNS problem. As you already confirmed that your hosts file is fine the only thing I can imagine is your phone using some 'wrong' DNS server for address lookup.
To make (almost) sure you use a set of different DNS servers you could disconnect your phone from the wifi and enable a 3G data connection. Make absolutely sure you are not connected to your wifi. Now again run 'ping lh3.ggpht.com'; do you get a response?
Yes, that is the case.
Another weird thing is that phone on 3G resolves lh3.ggpht.com as 173.194.35.139, while PC on WiFi as 209.85.148.132. My 'hosts' file contains only localhost reference.
When I switch to WiFi while pinging that host, pings keep successful, unless I restart terminal session — after that I get 'unknown host' message.
Is there DNS configuration in Android somewhere?
OK, it seems I fixed it.
My WiFi works in a bigger subnet and hides all connected WiFi devices as as single computer.
I've installed on my Phone app called Set DNS from former Android Market, which allowed me to change both primary and secondary DNS. Initally both addresses were pointing to WiFi router itself which seems to work fine for my PC. I've changed it to DNSes of that bigger subnet I'm connected to. And it did the trick. Hopefully it won't mess settings for other WiFis I use to connect.
Thanks for showing me right direction!
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