I have a computer with two network devices (
wlan0), both connected to the internet (two different connections/isp).
I'm trying to share the connection of
wlan0 to another computer connected via ethernet to
What I'm doing is:
# sysctl net.ipv4.ip_forward=1
# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
From the client computer I can then connect to this one, but the internet connection that gets shared is the one on
eth0 and not the one on
If I disable the internet connection on
eth0 (by setting no gateway), then the connection to be shared is the one on
wlan0. However, I'd like to have both internet connections enabled and specify to iptables which one to share. Is this possible?
What am I missing? Do I need some forwarding rule?