Home Networking CCCC Linux Desktop SIG August 20, 2007
Overview ● Goals ● Simple Setup ● Hardware ● Software
Goals ● Share your Internet Connection ● Share your files ● Archive your files
Soapbox ● This is an ugly hack. ● The real solution is to use a router. ● You need this hack because your ISP has not given you proper address space for your computers. ● Some people don't want the internet to work the way it should. You should have a name space and end to end visibility of all of your computers. ● IPV6 can fix this, but adoption is slow.
Simple Setup
Hardware ● Old Computer ● Cable/DSL Modem and Two Ethernet Cards. ● or Ordinary Modem and Ethernet Card ● Wifi Access Point and or Hub. ● Big Fat Hard Drive or Two.
Old Computer ● This is for your data server and gateway. ● Anything Will Do. ● PII, K6/2 and above will do X comfortably, so that you can use GUI configuration tools.
Modem ● Cable is fastest in BR. ● DSL has fewer restrictions. ● Dial up works but is slow and connection must be initialized. Be sure to use a real hardware modem. Old ISA and external are best.
Network Cards ● One is for the cable modem ● The other is for the local network ● Anything that works will do, but matching fast cards perform best.
Hubs and Access Points ● Wifi is cheap and easy if all you do is change the administrator password. ● Simple B is all you need. Others offer more range and speed. ● You can use most Wifi access points as a hub. ● A regular wired hub and static IP addresses simplify file sharing internally.
Big Fat Hard Drive ● Files take up space so bigger is better. ● Any drive will do, slow and quiet is best. ● It's a good idea to duplicate your archive with more than one machine, so get two drives and stick one in one of your regular computers.
Software ● Network Configuration. ● SFTP Server ● Kguarddog ● IP Chains / IP Tables ● Konqueror Web Browser ● Grsync
Network Configuration ● Gateway Configuration ● Workstation Configuration ● Both only require modification of a few files.
Gateway Configuration ● Interface cards ● Hosts File or DNS
Interface cards ● Magic file is “/etc/network/interfaces” ● Half of it is already working if you installed with a cable modem. ● Your first card is “eth0” and it should be working by DHCP already. ● Your second card is “eth1” and you will want to give this card a static IP address. ● Let's look at an example.
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # This is a list of hotpluggable network interfaces. # They will be activated automatically by the hotplug subsystem. mapping eth0 script grep map eth0 mapping eth1 script grep map eth1 # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp allow-hotplug eth1 iface eth1 inet static address netmask broadcast
mapping eth1 script grep map eth1 # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp allow-hotplug eth1 iface eth1 inet static address netmask broadcast Important parts ● Duplicated Mapping ● Left eth0 alone ● Create or Modify eth1 with: – “static” instead of “dhcp” – address, netmask and broadcast shown or from another example. ● Works for me!
Interface cards ● Once you have modified /etc/network/interfaces ● Restart your network with: “/etc/init.d/networking restart” ● Or just try to bring up the interface with: “ifup eth1” ● Xandros and friends have GUI tools that do the same.
Hosts File ● I like static names for my computers. ● “/etc/hosts” keeps track of them. ● The x.x address space has been set aside for local networks. ● Here's an example of what to add: erris180.btnrug1.la.home.com erris erris150.btnrug1.la.home.com erris agamemnon.btnrug1.la.home.com agamemnon familypc.btnrug1.la.home.com familypc old76.btnrug1.la.home.com old76
Hosts File ● Demo ping of home systems by name. ● If you don't like this, you can install and configure a DHCP server, or just use the one in your wifi access point.
Client Configuration ● Same thing, but clients only have one static interface. ● Same hosts file. ● Here's an example /etc/hosts/interfaces: # The primary network interface #allow-hotplug eth1 iface eth1 inet static address netmask broadcast gateway
SFTP Server ● Secure File Transfer Protocol is used to move files safely under encryption. ● It takes a password or key authentication to keep unwanted users out. ● Get the “openssh-server” package ● Demo CLI client, “sftp homebox” ● Demo Konqueror, “sftp://homebox” ● Cool, eh?
SFTP Server ● Password Warning !!!! ● Internet Facing Passwords Must Be Good ● Use a letter or two from each word in a phrase from a book you own. Highlight the phrase. ● Don't be afraid of writing the phrase and keeping it in your wallet – someone who has access to your wallet that's interested in your computers already has you.
KDE GuardDog ● This is your MASQUERADE firewall. ● Get package guarddog and guidedog ● Run guidedog to start masquerading. ● Your internal computers should now see the big bad internet. ● Forward ports if you want. ● Run guarddog if you want to block ports.
Grsync ● Uses sftp to sync files with a nice GUI. ● Get package grsync. ● Start it from a CLI because you will be asked for a password there.
Grsync ● Demo grsync ● Notice source and destination conventions ● Shown is a transfer from a local machine to a directory on “homebox”
Fun stuff ● Demo Noatun ● Demo http over sftp ● Demo “ssh -X hostname” tunnel into home network