Hello,

This configuration works with earlier Android versions. Now when the Android 
device attempts to use DNS, it hits a name server 2 subnets away. In the 
previous version, the Class C IP was transformed into a Class B and used the 
DNS server on this subnet. Now the DNS request is going through the 10.10.17.1 
gateway.

Android Device: Static IP, NAT routed to WAN, Class C IP
----------------------
busybox ifconfig usb0 192.168.1.2 netmask 255.255.255.0
busybox route add default gw 192.168.1.254
ndc resolver setifdns usb0  10.10.19.117 10.10.19.119
ndc resolver setdefaultif usb0


Linux Router Configuration: eth0 real IP is Class B
----------------------------
$IPTABLES -A FORWARD -i eth0 -o usb0 -m state --state ESTABLISHED,RELATED -j 
ACCEPT
$IPTABLES -A FORWARD -i usb0 -o eth0 -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# Forward the FTTS multicast service packets to PCU
$IPTABLES -A FORWARD -i eth0 -o usb0 -d 226.10.10.10/32 -j ACCEPT

# enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_dynaddr

# setup an alias so it is easier to use the gateway
$IFCONFIG eth0 10.10.17.99  netmask 255.255.0.0
$ROUTE add default gw 10.10.17.1 dev eth0
$IFCONFIG eth0:0 192.168.1.254 netmask 255.255.255.255

# configure the usb0 interface
$IFCONFIG usb0 192.168.1.1

DNS Server:
--------------
ifconfig eth0 10.10.17.117
ifconfig eth1 10.10.19.117

Note:
1. I tried changing the Android IP to a Class B but it did not make any 
difference.

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to