Both interfaces have internet access. eth0 through DSL router 192.168.1.1 and wlan0 through android access point, 192.168.43.1. The default gateway is 192.168.1.1, but I can easily switch it to the other one using the following commands as root:
ip route delete default ip route add default via 192.168.43.1
Afterwards, Host_A uses the android access point to the internet successfully.
This goes to the internet through the DSL router 192.168.1.1. I want it go out through the wireless access point, which essentially means it should go through 192.168.1.3. To this end I did the following
ip route delete default ip route add default via 192.168.1.3
Also I have enabled packet forwading in Host_A using:
sysctl -w net.ipv4.ip_forward=1
Afterwards, cat /proc/sys/net/ipv4/ip_forward returns 1
The thing is, Host_B cannot got to the internet. I would like to have Host_B to have internet connectivity through Host_A wlan0 interface. Firewalls are disabled on both hosts and my conviction is that I should not have to mess with iptables to achieve this. Both hosts are Debian. Host_A and Host_B are on the same physical network using the DSL Router switching interface.
If anyone has any idea what could be wrong, I would be obliged.