iptables vs bridge-utils vs route
I have two network cards in a Linux server and don't know how to make them communicate. After searching a lot I still don't know which method is the one that should work, nor the implications of using each.
Here is my system.
cat5 cable +----------------------------------+ cable
<------------- | my server |<------> WiFi router
router | eth1 eth2 | 192.168.0.1
& internet | 10.11.12.13 192.168.7.7 | gw:192.168.7.7 ?
| gateway: 10.1.1.1 | 192.168.0.x for WiFi clients
The wifi clients should be able to access the internet and the 10.x.x.x subnet, but the wifi clients cannot be on the 10.x.x.x subnet, they have to have IP addresses in the 192.168.x.x range.
So how do I connect the two networks? Do I use iptables? Do I use the linux "route" command? Do I make a network bridge with bridge-utils?
Also, should the WiFi gateway be 192.168.0.1 or 192.168.7.7 ?
I've plugged the cable from the server to the router into the WAN port.
P.S. I've asked this on StackExchange (i) Networking and (ii) Linux and gotten no answers, (iii) and also tried Reddit.
route
command on your server (that, to be honest, shall we call router)? Did it have as default gateway 10.1.1.1? Did it connect to internet? Are you sure that you really need a /8 address on eth1? – feligiotti Oct 07 '14 at 13:49