I have a server with two network cards:
- eth0 -> public static ip
- eth1 -> local network dhcp
Both cards are connected to the same modem.
If I enable only eth0, I can access from local network (and from internet) using its subdomain or public ip.
If I connect also eth1, I can access from local network only using internal ip, and from internet (obviusly) using only public ip / subdomain.
How can I access this machine from public ip also from other machines on local network with eth1 enabled?
Edit: I have no gateway on second interface, and ip_forward is already enabled.
Here the config:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address x.x.x.x netmask 255.255.255.248 nameserver 18.104.22.168 gateway x.x.x.y auto eth1 iface eth1 inet dhcp