I've got two ubuntu PCs and one Android tablet. Android tablet tethers via usb with PC1. I'd like to connect the PC2 with PC1 so PC2 also becomes able to access the internet. Moreover it should also be possible for the Tablet to access both PCs (via ping for example). The setup should preferably use static IPs.
Tablet <---- (USB-Tethering) ---- PC1 <---- (Ethernet) ---- PC2
I managed to tether the tablet via USB with this PC1 /etc/network/interfaces configuration:
PC1:
auto usb0
iface usb0 inet static
address 192.168.1.1
network 192.168.1.0
netmask 255.255.255.0
Here's my current setup for eth0: PC1
auto eth0
iface eth0 inet static
address 192.168.2.1
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255
PC2
auto eth0
iface eth0 inet static
address 192.168.2.2
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255
Is the setup of PC1 and PC2 so far correct? How do I link PC2 with the Tablet and therefore the internet?
ip forwarding is activated on PC1.