What is the easiest way to give PC2 access to the Internet through PC1 in the setup below:
PC2 [192.168.0.200 dhcp client] | eth0 [192.168.0.123] PC1 [runns dhcpd on subnet 192.168.0.200-250] wlan0 [192.168.1.123 dhcp client] | Router with nat [192.168.1.1] | Internetz
Background: PC2 is a headless computer with no wifi running a dhcp client. PC1 is my regular laptop connecting through wifi to a cable modem. I would like to configure PC2 (eg. sshing in to it and pull stuff from the Internet) using PC1.
Since it's a wifi and an eth0 they can't be bridged using
I found this "Bridging wlan0 to eth0" method of doing it with iptables, where iptables is used to do nat on PC1. But is it necessary? The 192.168.1.0/24 and 192.168.0.0/24 are different so do they need to be nat:ed?
Is it possible to use
route somehow on PC1 to route between the subnets?