Debian Based Firewalled Router

Debian Based Firewalled Router

By:


On this article you'll discover ways to setup your very personal ubuntu router web gateway. The ubuntu router / router will act precisely like any other router that you would be able to purchase at the retailer, besides your linux field may have more performance and extra security. What you will want to construct your Ubuntu Router Internet Gateway:

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

This text will explain the best way to setup a fresh set up of Ubuntu 10.04 server edition, configuring a dhcp server for a neighborhood network,while a together with a firewall from the nasty internet. The first thing that you're going to do is a recent set up of the Ubuntu server version, but selecting solely Open SSH server throughout the software program installation section of the Ubuntu install. After the installation completes and your pc reboots, you're then going to want to set a root password (su).

sudo passwd root

After you've gotten a set a root password, login into root by typing the following command:

su

After you are in tremendous person mode (root) we're then going to wish to replace our Ubuntu Bistro. Type the following commands to replace 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

In the example below my eth0 represents the network interface that connects to the internet and the eth1 interface connectsto the switch. The swap then connects to your whole other networked devices, resembling 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 following following step isn't required, but I wish to set a hostname for my router, all it's a must to do is set up apache and you could possibly have your own private intranet or internet 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 next above, you need to use putty to access your linux machine from your windows based mostly pc. It will can help you copy and paste the next code, to speed up the process of creating your linux gateway. The first thing that you could do to use putty to configure your Ubuntu router, is about a static ip on your home windows machine, since we do not have a dhcp server put in yet. Set a static ip deal with for Microsoft Vista.Should you do not need to use putty you possibly can simply type out the rest of the code, putty just makes it easier. After you have chosen your terminal program that your are going to make use of, once more login beneath root. It is now time to install some software, that we might want to setup the gateway.

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 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 make use of to configure you ubuntu gateway and other server packages that you just may use. In the event you use webmin, you will be able to simply configure you server, utilizing any net browser you choose.

cd /opt

mkdir webmin

cd /opt/webmin

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

tar xzvf webmin-1.430.tar.gz

cd webmin-1.430/

./setup.sh

Throughout installation you may be requested just a few questions, simply press enter a few times. The one factor that you simply need to change is the port number, person title 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 on the create button. It is best to now see a icon that reads 192.168.10.zero, click on this new icon and then click on on the Edit Client 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 on the save button twice, which should return you to the primary Dhcp server window. Contained in the dhcp server screen, you see a button known as Edit Community Interface, click this button and choose eth1 then click save. Now click on the Begin Sever button, should 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.


About the Author:
Ubuntu Router Gateway



Article Originally Published On: http://www.articlesnatch.com


|

Loading...
Related....
Videos...

Recent Software Articles

Comments

Still can't find what you are looking for? Search for it!

Loading

Copyright 2005-2011 ArticleSnatch, LLC - All Rights Reserved.
Privacy Policy | Terms of Service.