I am trying to get the feet wet, for the fun only.
Thist how-to is out of date, but easy to follow:
http://users.telenet.be/mydotcom/howto/ ... /linux.htmThis one is more elaborate (mainly on dnsmasq and iptables), but German:
http://wiki.ubuntuusers.de/Router(there usually is an English version in the according ubuntu wiki too)
Here is my question:
The code block for interfaces :
- Code:
#loopback interface
auto lo iface lo inet loopback
# interface external network (internet), configured through dhcp
auto eth0
iface eth0 inet dhcp
#interface network 1
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
#interface network 2
auto eth2
iface eth2 inet static
address 192.168.20.1
netmask 255.255.0.0
network 192.168.20.0
broadcast 192.168.20.255
speaks of 3 interfaces (besides loopback). eth0, eth1 and eth2.
I got it right:
eth0 is to connect the router to the modem and (in this case) to the internet.
eth1 is one internal network connected to the router.
eth2 is a second internal network connected to the router
?
That is:
If i have only 2 network cards, i use eth0 for the internet and eth1 for an internal network, but skip eth2 completely?
(If i had 3 cards i would make an according 4. entry) ?
Any other tips or experiences are welcome too.
I really need the most basic setup (for dnsmasq and iptables), to have something to start with. This will not be used in real life, it is a learning project (little problems in security don't matter right now, those questions come later).
I also need to be more clear about routing (the interfaces has no entry for gateway. How come?).
I did the best i could to explain what i want. If i could explain it better i wouldn't need to ask.