On this article you will learn how to setup your very own ubuntu router internet router. The ubuntu router / router will act precisely like any other router you could purchase on the store, besides your linux box may have extra functionality and further security. What you will want to build your Ubuntu Router Internet Gateway:
- Extra pc
- (2) Ethernet cards
- Ubuntu 8.04 LTS Server Version
- Putty This text will explain easy methods to setup a recent install of Ubuntu 10.04 server version, configuring a dhcp server for a neighborhood community,whereas a together with a firewall from the nasty internet. The very first thing that you are going to do is a fresh set up of the Ubuntu server version, but choosing only Open SSH server during the software set up part of the Ubuntu install. After the set up completes and your pc reboots, you might be then going to want to set a root password (su). sudo passwd root After you might have a set a root password, login into root by typing the following command: su After you are in super consumer mode (root) we’re then going to want to replace our Ubuntu Bistro. Type the following instructions to update the os and other programs. apt-get update apt-get upgrade After your computer updates, restart it. reboot Setup Network Cards vi /etc/network/interfaces Within the instance below my eth0 represents the community interface that connects to the web and the eth1 interface connectsto the switch. The swap then connects to your entire other networked devices, comparable 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 next following step will not be required, but I like to set a hostname for my router, all you need to do is install apache and you may have your individual private 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 Once you have accomplished the next above, you should use putty to entry your linux machine from your windows based mostly pc. This will help you copy and paste the following code, to speed up the process of making your linux router. The very first thing that you will need to do to use putty to configure your Ubuntu router, is ready a static ip in your windows machine, since we do not have a dhcp server put in yet. Set a static ip address for Microsoft Vista.For those who do not need to use putty you can simply kind out the rest of the code, putty simply makes it easier. Once you have chosen your terminal program that your are going to use, again login underneath root. It is now time to install some software program, that we will need to setup the router. apt-get set up 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 allow 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 use to configure you ubuntu gateway and different server programs that you just would possibly use. If you use webmin, it is possible for you to to simply configure you server, utilizing any web 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 set up you can be requested a couple of questions, simply press enter a few times. The only thing that you just want to change is the port quantity, user 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 could have entered the the above click on 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 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 have got the above into the consumer choices home windows click the save button twice, which should return you to the principle Dhcp server window. Inside the dhcp server display screen, you see a button known as Edit Network Interface, click on this button and choose eth1 then click save. Now click on the Begin Sever button, if 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 Now that concludes how to build your own Ubuntu Router Internet Gateway.