Ubuntu Router Gateway

Published: 03rd June 2010
Views: N/A
Ask About This Article Print Republish This Article
On this article you will learn how to setup your very own ubuntu router internet router. The ubuntu router / router will act exactly like any other router that you would be able to purchase on the store, besides your linux box may have extra functionality and further security. What you'll need to construct your Ubuntu Router Internet Gateway:



* Extra computer

* (2) Ethernet cards

* Switch

* Ubuntu 8.04 LTS Server Edition

* Putty



This text will clarify how one can setup a fresh set up of Ubuntu 10.04 server edition, configuring a dhcp server for a local community,while a including a firewall from the nasty internet. The very first thing that you are going to do is a contemporary install of the Ubuntu server version, however deciding on only Open SSH server in the course of the software program set up section of the Ubuntu install. After the set up completes and your computer reboots, you might be then going to wish to set a root password (su).



sudo passwd root



After you will have a set a root password, login into root by typing the next command:




su



After you're in super user mode (root) we are then going to need to replace our Ubuntu Bistro. Sort the following commands to replace the os and other programs.



apt-get replace



apt-get improve



After your pc updates, restart it.



reboot



Setup Network Cards



vi /etc/network/interfaces



Within the instance below my eth0 represents the network interface that connects to the internet and the eth1 interface connectsto the switch. The swap then connects to all your different networked gadgets, similar to your gaming system and different 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 following following step just isn't required, however I prefer to set a hostname for my gateway, all it's a must to do is set up apache and you would have your own 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



Upon getting accomplished the next above, you should utilize putty to access your linux machine out of your windows primarily based pc. It will assist you to copy and paste the following code, to speed up the process of making your linux gateway. The very first thing that you will need to do to make use of putty to configure your Ubuntu gateway, is set a static ip in your windows machine, since we do not have a dhcp server installed yet. Set a static ip address for Microsoft Vista.When you don't want to use putty you possibly can just sort out the rest of the code, putty simply makes it easier. After getting chosen your terminal program that your are going to make use of, once more login underneath root. It is now time to install some software program, that we might want to setup the router.



apt-get install dhcp3-server bind9 vim perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

Allow packet forwarding



vi /etc/sysctl.conf



Uncomment the following 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 gateway and different server applications that you just would possibly use. Should you use webmin, you will be able to easily configure you server, using any net browser you choose.



cd /opt



mkdir webmin



cd /opt/webmin



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



tar xzvf webmin-1.430.tar.gz



cd webmin-1.430/



./setup.sh



Throughout set up you will be requested just a few questions, just press enter a few times. The one factor that you wish to change is the port number, user identify and password and in addition 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 have entered the the above click on the create button. You must now see a icon that reads 192.168.10.0, click on on this new icon and then click on on the Edit Shopper Options 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've got the above into the consumer options home windows click the save button twice, which ought to return you to the primary Dhcp server window. Inside the dhcp server screen, you see a button known as Edit Network Interface, click this button and choose eth1 then click save. Now click on on the Begin Sever button, in case 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



Now that concludes how to build your own Ubuntu Router Internet Gateway.

Video Source: Youtube

This article is free for republishing
Source: http://timtdvqzin.articlealley.com/ubuntu-router-gateway-1581872.html


Report this article Ask About This Article Print Republish This Article


Loading...
More to Explore
 


Ask a Professional Online Now
27 Experts are Online. Ask a Question, Get an Answer ASAP.
Type your question here...
Optional:
Select...