Installing debian - kernel - internet access on phone

Timo Juhani Lindfors timo.lindfors at iki.fi
Tue May 24 16:30:11 CEST 2011


Eric Smith <es at fruitcom.com> writes:
> eric at debian:~$ sudo iptables -nvL -t nat
> Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
>  pkts bytes target     prot opt in     out     source               destination         
>
> Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
>  pkts bytes target     prot opt in     out     source               destination         
>
> Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
>  pkts bytes target     prot opt in     out     source
>  destination         

This shows that there is no NAT. Your phone can't talk to the outside
world using its private 192.168.4.202 address. You need to setup NAT
that translates packets between public and private address. Something
like

iptables -A POSTROUTING -o net -t nat -j MASQUERADE -s 192.168.4.0/24
echo 1 > /proc/sys/net/ipv4/ip_forward

should work assuming that your upstream interface is called "net" like
here. Yours might be eth0?



More information about the community mailing list