by Walter Rudametkin linux nslu2 work-in-progress
Posted 2010.07.29 — Rennes, FranceIt's easy to setup additional IP addresses on Debian Linux. This is particularly useful for the NSLU which doesn't have a display so you need to remotely connect to it.
Having more than one virtual network interface allows us to have both a DHCP address and a static IP address, making the NSLU2 accessible pretty much always.
I'm supposing you have somekind of IP address already setup. Also, you should have a working DNS, although this shouldn't impact any of the following.
Once you can ping the gateway machine, the gateway must be added so that the nslu knows that he can attain addresses that are beyond his own network.
Command is
Then the /etc/resolv.conf
must be edited to the same nameserver as the other box. Note that nslu should be able to ping this nameserver once the gateway is setup.
For setting up the gateway we must enable ip forwarding:
If we want to setup alias cards, we can do something along the lines of
bash
ifconfig eth0:N address netmask
However, it's probably easier to just edit the /etc/network/interfaces
file by adding something like this
This allows us to have a static IP address in addition to whatever other configured addresses we might have. I used it to have both a DHCP assigned address and a static local network address, allowing me to always get access to the NSLU2, even if it's not getting an address through DHCP.
Finally, must set up iptables to the correct rules!!!
I found and change a script to setup the tables to allow
Sorry, no comments enabled for now because I'm using a simple static site generator (maybe I'll try out disqus another day).
But if you like what you see, send me an email.