[Android Q&A, Help & Troubleshooting] mvmacd:
Here's the deal, I have Ubuntu and 2 wifi cards.

wlan5 is long-range has 192.168.1.42 with internet on 192.168.1.1

wlan3 is internal, connected to my HTC Rezound with 192.168.43.104, and can ping 192.168.43.1, my phone.

I set up a Tether network on my CM10 Rezound because my phone doesn't see AdHoc networks, which is what I usually do to share internet from my laptop.

So I have enabled IP forwarding on my Ubuntu laptop.

# sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1

ifconfig:

wlan3 Link encap:Ethernet HWaddr 9c:b7:0d:a5:45:67
inet addr:192.168.43.104 Bcast:192.168.43.255 Mask:255.255.255.0
inet6 addr: fe80::9eb7:dff:fea5:4567/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:492 errors:0 dropped:0 overruns:0 frame:0
TX packets:536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47825 (47.8 KB) TX bytes:69980 (69.9 KB)

wlan5 Link encap:Ethernet HWaddr 00:c0:ca:58:c9:5f
inet addr:192.168.1.42 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:caff:fe58:c95f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14602 errors:0 dropped:0 overruns:0 frame:0
TX packets:12503 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11577132 (11.5 MB) TX bytes:3411451 (3.4 MB)

My route on Ubuntu:

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default buffalo.setup 0.0.0.0 UG 0 0 0 wlan5
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan5
192.168.43.0 * 255.255.255.0 U 0 0 0 wlan3

And my iptables on Ubuntu

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

On my laptop I can ping external IP 208.67.222.222, and phone 192.168.43.1

Now on my HTC Rezound [192.168.43.1] I can only ping my laptop [192.168.43.104].

On my phone:

localhost / $ ip route add default via 192.168.43.104
localhost / $ ip route
default via 192.168.43.104 dev wlan0
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.1

ifconfig:

$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 02:1A:11:FB:32:04
inet addr:192.168.43.1 Bcast:192.168.43.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54113 errors:0 dropped:5692 overruns:0 frame:0
TX packets:36647 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47922457 (45.7 MiB) TX bytes:6148861 (5.8 MiB)

and lastly, iptables:

$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
bw_INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
bw_FORWARD all -- anywhere anywhere
natctrl_FORWARD all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
bw_OUTPUT all -- anywhere anywhere
droidwall all -- anywhere anywhere

Chain bw_FORWARD (1 references)
target prot opt source destination

Chain bw_INPUT (1 references)
target prot opt source destination
all -- anywhere anywhere ! quota globalAlert: 2097152 bytes
RETURN all -- anywhere anywhere
all -- anywhere anywhere owner socket exists

Chain bw_OUTPUT (1 references)
target prot opt source destination
all -- anywhere anywhere ! quota globalAlert: 2097152 bytes
RETURN all -- anywhere anywhere
all -- anywhere anywhere owner socket exists

Chain costly_shared (0 references)
target prot opt source destination
penalty_box all -- anywhere anywhere

Chain droidwall (1 references)
target prot opt source destination

Chain droidwall-3g (0 references)
target prot opt source destination

Chain droidwall-reject (0 references)
target prot opt source destination

Chain droidwall-wifi (0 references)
target prot opt source destination

Chain natctrl_FORWARD (1 references)
target prot opt source destination

Chain penalty_box (1 references)
target prot opt source destination

(I have ProxyDroid but I've disabled it)

So now I try to ping an external IP, but it doesn't work. It never gets a reply, or doesn't give an error message after about a minute, and then I ^C it.

Now my end goal is to have all my apps use the wifi connection on 192.168.43.104. I know I must have done something wrong, but I cannot figure it out. I've been trying to figure it out by googling, etc, for weeks now, and I thought it was about time to ask here.

If you know a network guru on the forum, please send him a link to this, I really want to get it working.

Also, I will mention I tried using SSH Tunnel (Beta) pointing to my 192.168.43.104 laptop with SSHd running [I can ssh localhost]. It doesn't work, it says it failed to connect. I should note with adb shell, I can SSH into my laptop 192.168.43.104 perfectly, via the wifi tether network.

I think that's it, I hope it wasn't too long that nobody reads it.

Well ANY help would be appreciated. I have tried a few proxy apps, using SOCKS5 pointed at my 192.168.43.104 IP but none of them have worked so far.