Home | Computers | Networks

Debian Based LAN Router

By: Nils Hyatt


Read More About Networks

On this article you will learn to setup your very own ubuntu router internet gateway. The ubuntu router / gateway will act exactly like some other router that you would be able to purchase at the retailer, besides your linux box could have more functionality and further security. What you will need to build your ubuntu router:

* Extra pc
* (2) Ethernet cards
* Switch
* Ubuntu 8.04 LTS Server Version
* Putty

This article will clarify methods to setup a fresh install of Ubuntu 10.04 server version, configuring a dhcp server for an area network,while a together with a firewall from the nasty internet. The first thing that you are going to do is a contemporary install of the Ubuntu server version, however choosing only Open SSH server through the software set up section of the Ubuntu install. After the set up completes and your pc reboots, you're then going to want to set a root password (su).

sudo passwd root

After you could have a set a root password, login into root by typing the following command:

su

After you are in tremendous consumer mode (root) we're then going to want to update our Ubuntu Bistro. Kind the following instructions to replace the os and other programs.

apt-get update

apt-get upgrade

After your pc updates, restart it.

reboot

Setup Network Cards

vi /etc/network/interfaces

In the instance below my eth0 represents the community interface that connects to the web and the eth1 interface hooksto the switch. The switch then connects to your entire different networked units, such as your gaming system and different networked devices. I added the following code into the /etc/network/interfaces file:

Vi /etc/network/interfaces

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

/etc/init.d/networking restart

The next following step shouldn't be required, however I like to set a hostname for my router, all it's a must to do is install apache and you could have your individual personal intranet or web server.

vi /etc/hosts

echo homeserver.gateway.2wire.net > /etc/hostname

/etc/init.d/hostname.sh start

hostname

hostname -f

Ubuntu Hostname

After you have accomplished the next above, you should use putty to access your linux machine out of your home windows based mostly pc. This may mean you can copy and paste the following code, to speed up the process of creating your linux router. The very first thing that you must do to make use of putty to configure your Ubuntu router, is set a static ip on your home windows machine, since we do not have a dhcp server put in yet. Set a static ip address for Microsoft Vista.In case you do not want to use putty you possibly can just type out the remainder of the code, putty simply makes it easier. After getting chosen your terminal program that your are going to use, again login under root. It's now time to put in some software, that we will need to setup the gateway.

apt-get set up dhcp3-server bind9 vim perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl
Enable packet forwarding

vi /etc/sysctl.conf

Uncomment the next line to enable packet forwarding for IPv4

net.ipv4.ip_forward=1

echo 1 > /proc/sys/net/ipv4/ip_forward
Install Webmin

Webmin is anther good program to make use of to configure you ubuntu router and different server programs that you may use. When you use webmin, you will be able to simply configure you server, using any internet browser you choose.

cd /opt

mkdir webmin

cd /opt/webmin

wget http://prdownloads.sourceforge.web/webadmin/webmin-1.430.tar.gz

tar xzvf webmin-1.430.tar.gz

cd webmin-1.430/

./setup.sh

During installation you can be asked just a few questions, simply press enter just a few times. The only factor that you want to change is the port quantity, consumer name and password and also say yes to SSL.

Ubuntu Webmin
Configure dhcp

Network address - 192.168.10.0

Netmask - 255.255.255.0

Address ranges -192.168.10.100 - 192.168.10.200

After you might have entered the the above click on the create button. It's best to now see a icon that reads 192.168.10.0, click on this new icon after which click on on the Edit Consumer Choices button.

Subnet mask - 255.255.255.0

Default routers - 192.168.10.1

Broadcast address - 192.168.10.255

DNS servers - 192.168.10.1

After you might have the above into the shopper choices home windows click the save button twice, which ought to return you to the main Dhcp server window. Contained in the dhcp server screen, you see a button called Edit Network Interface, click this button and select eth1 then click save. Now click on on the Begin Sever button, when you see no errors, you're good.
Configure firewall

Input:

Accept if input interface is lo

Accept if input interface is eth0 and state of connection is ESTABLISHED,RELATED

Accept if input interface is eth1

Forward:

Accept if input interface is eth0 and output interface is eth1 and state of connection is ESTABLISHED,RELATED

Accept if input interface is eth1 and output interface is eth0

Article Source: http://depositarticles.com/

Ubuntu Router Internet Gateway

Please Rate this Article

 

Not yet Rated

Click the XML Icon Above to Receive Networks Articles Via RSS!

counter easy hit

Powered by Article Dashboard