Electronox Blog Electronox Photo Gallery Electronox Forum

Debian Etch Linux Router June 2nd, 2007 by Justin

 

It’s a boy? No, it’s Deb-ian!

  1. Now you may log in as root with the password you set up earlier.
  2. You will be greeted by a command line interface – bash. When you see this “-#” I am asking you to type the following line in and run the command.
  3. - # nano /etc/network/interfaces
  4. This opens the interfaces file. It’s a text file and you’re in a basic text editor – nano. Edit this file to look like this:

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet dhcp

    auto eth1
    iface eth1 inet static
    address 10.0.0.1
    netmask 255.255.255.0

    Your router will have two separate IP addresses, one for the local network (10.0.0.1) and one dynamically assigned by your ISP (e.g. 69.242.160.11).

  5. - # nano /etc/resolv.conf
  6. The file resolv.conf should look something like this, depending on your ISP. This points the router to nameservers to resolve domain names. Usually this is all filled out for you by the installer. If it is blank, be sure to find valid IP addresses for the nameservers for your ISP.

    search hsd1.mo.comcast.net.
    nameserver 68.87.72.130
    nameserver 68.87.77.130

  7. - # /etc/init.d/networking restart
  8. Run this to apply the changes you made.

  9. - # ping www.google.com
  10. …and test. If you timeout, something is wrong.

  11. On a local computer plugged into the eth1 interface: ping 10.0.0.1
  12. and test again…

  13. - # apt-get update
    • This command will update the lists of packages on your system.
  14. - # apt-get upgrade
    • And this command will download and apply any updates found. Click Y if it asks to confirm.
  15. - # reboot
    • Some changes, like an updated kernel, will require a reboot, so it’s a good idea everything still works after a reboot. Run the same ping tests from earlier after you log back into the router.
  16. - # apt-get install openssh-server
    • This is optional, but ssh with Putty should work fine now, using 10.0.0.1 from a local machine. This way you can sit back and relax in your own chair and not underneath the stairs next to the cable modem…

LAN TIME! – Installing DHCP/DNS server

  1. - # apt-get install dnsmasq
  2. - # nano /etc/dnsmasq.conf
  3. ctrl-w: "#interface="
    uncomment “#interface=” change to interface=eth1

    ctrl-w: "#domain="
    uncomment “#domain=” change to domain=electronox.net

    scroll down
    change first “#dhcp-range=blahblahblah” to dhcp-range=10.0.0.100,10.0.0.200,12h

    Optional – assign a static ip to your computer (good for port forwarding)):

    #dhcp-host=macaddressofcomputer,nameofcomputer,IPyouwant,howlongtheIPisgood
    #EXAMPLE:
    dhcp-host=00:E0:18:99:88:77,iris,10.0.0.15,infinite

  4. - # /etc/init.d/dnsmasq restart
  5. Test getting IP’s on other local machines. Do they get an IP? (internet probably won’t work on them yet, but do they get a nice 10.0.0.x ip?)
  6. Reboot router. Can the router ping www.google.com, do local computers get IP’s still?


Warning: number_format() expects parameter 1 to be double, array given in /var/www/www.electronox.net/htdocs/blog/wp-includes/functions.php on line 155
Comments () »

No comments yet.

Leave a comment

updates
 
  • Download the desktop portal.
most recent blog posts
most recent comments
most recent forum posts
 
log in