Debian Based LAN Router |
||||
| By Nils Hyatt |
||||
| On this article you will learn to setup your very personal
ubuntu router internet gateway. The ubuntu router / router
will act exactly like every other router which you can
purchase at the store, besides your linux field can have
more functionality and additional security. What you will
have to build your ubuntu router: * Extra pc * (2) Ethernet cards * Switch * Ubuntu 8.04 LTS Server Edition * Putty This article will explain how one can setup a contemporary install of Ubuntu 10.04 server version, configuring a dhcp server for an area network,while a including a firewall from the nasty internet. The first thing that you are going to do is a contemporary install of the Ubuntu server edition, however selecting solely Open SSH server during the software set up part of the Ubuntu install. After the set up completes and your pc reboots, you are 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 next command: su After you´re in tremendous consumer mode (root) we are then going to want to replace our Ubuntu Bistro. Kind the following commands to update the os and different programs. apt-get update apt-get upgrade After your computer updates, restart it. reboot Setup Network Cards vi /etc/network/interfaces In the example below my eth0 represents the community interface that connects to the internet and the eth1 interface hooksto the switch. The swap then connects to all of your different networked devices, equivalent 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 is not required, however I wish to set a hostname for my router, all you have to do is install 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 After getting completed the following above, you should use putty to access your linux machine from your windows based pc. It will let you copy and paste the following code, to speed up the process of creating your linux gateway. The first thing that you need to do to make use of putty to configure your Ubuntu router, is set a static ip in your windows machine, since we don´t have a dhcp server installed yet. Set a static ip handle for Microsoft Vista.In the event you do not need to use putty you´ll be able to just sort out the rest of the code, putty simply makes it easier. After you have chosen your terminal program that your are going to use, again login below root. It is now time to put in some software, 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 next 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 applications that you simply might use. If you use webmin, you will be able to easily 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 Throughout set up you may be asked a number of questions, just press enter a number of times. The only factor that you just want to change is the port quantity, consumer 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 got entered the the above click on on the create button. It´s best to now see a icon that reads 192.168.10.0, click on this new icon and then click on on the Edit Client 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 shopper choices 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 called Edit Community Interface, click this button and select eth1 then click save. Now click on on the Begin Sever button, should you see no errors, you are 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://interpret.zar.vg | ||||
| About The Author Ubuntu Router Internet Gateway |
||||
|
||||
| © 2012 interpret.zar.vg |