On this article you'll discover ways to setup your very own ubuntu router internet router. The ubuntu router / router will act precisely like another router which you can purchase on the retailer, besides your linux box will have more functionality and further security. What you'll need to build your ubuntu router:
* Extra laptop
* (2) Ethernet cards
* Switch
* Ubuntu 8.04 LTS Server Edition
* Putty
This article will clarify the right way to setup a recent set up of Ubuntu 10.04 server edition, configuring a dhcp server for a local network,while a together with a firewall from the nasty internet. The first thing that you're going to do is a contemporary set up of the Ubuntu server version, but deciding on solely Open SSH server throughout the software set up part of the Ubuntu install. After the set up completes and your computer reboots, you are then going to need 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 user mode (root) we're then going to wish to replace our Ubuntu Bistro. Type the next instructions to update the os and other programs.
apt-get replace
apt-get upgrade
After your laptop updates, restart it.
reboot
Setup Network Cards
vi /etc/network/interfaces
In the example below my eth0 represents the network interface that connects to the internet and the eth1 interface hooksto the switch. The change then connects to all of your other networked devices, corresponding to your gaming system and other networked devices. I added the next 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 subsequent following step just isn't required, but I prefer to set a hostname for my gateway, all you have to do is set up apache and you could possibly have your own personal intranet or net server.
vi /etc/hosts
echo homeserver.gateway.2wire.net > /etc/hostname
/etc/init.d/hostname.sh start
hostname
hostname -f
Ubuntu Hostname
Upon getting completed the following above, you can use putty to access your linux machine from your windows primarily based pc. This will help you copy and paste the following code, to hurry up the process of creating your linux router. The first thing that you will need to do to make use of putty to configure your Ubuntu gateway, is ready a static ip in your windows machine, since we don't have a dhcp server installed yet. Set a static ip deal with for Microsoft Vista.In the event you don't want to use putty you may just sort out the remainder of the code, putty simply makes it easier. Upon getting chosen your terminal program that your are going to make use of, once more login under root. It is now time to put in some software program, that we might want to setup the gateway.
Webmin is anther good program to make use of to configure you ubuntu gateway and other server applications that you might use. If you happen to use webmin, it is possible for you to to simply configure you server, using any web browser you choose.
During set up you will be asked just a few questions, simply press enter a couple of times. The only factor that you just need to change is the port quantity, person name and password and likewise 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. You should 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 may have the above into the client choices windows click on the save button twice, which ought to return you to the principle Dhcp server window. Inside the dhcp server display, you see a button called Edit Network Interface, click this button and select eth1 then click save. Now click on the Begin Sever button, when you see no errors, you might be 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