Wednesday, August 1, 2012

Ubuntu Firewall Router Gateway

ubuntu tablet pc
by edans

Ubuntu Firewall Router Gateway :


In this article you will learn how to setup your very personal ubuntu router web router. The ubuntu router / gateway will act exactly like any other router you can buy on the retailer, besides your linux box can have extra functionality and extra security. What you will want to build your Ubuntu Router Internet Gateway:

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

This article will explain tips on how to setup a fresh install of Ubuntu 10.04 server edition, configuring a dhcp server for an area community,while a including a firewall from the nasty internet. The first thing that you are going to do is a fresh set up of the Ubuntu server edition, however deciding on solely Open SSH server throughout the software set up section of the Ubuntu install. After the set up completes and your computer reboots, you're then going to wish 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 might be in super person mode (root) we're then going to want to replace our Ubuntu Bistro. Kind the following instructions to replace the os and different programs.

apt-get replace

apt-get improve

After your laptop 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 internet and the eth1 interface connectsto the switch. The switch then connects to your entire other networked devices, reminiscent of your gaming system and other 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 will not be required, however 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 individual 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

Once you have completed the next above, you should utilize putty to entry your linux machine from your windows based pc. This will permit you to copy and paste the following code, to hurry up the process of creating your linux gateway. The first thing that you have to do to use putty to configure your Ubuntu router, is ready 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.When you don't wish to use putty you can just kind out the rest of the code, putty simply makes it easier. Once you have chosen your terminal program that your are going to make use of, again login below root. It is now time to install some software, 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 router and other server programs that you simply may use. Should 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

During set up you will be requested just a few questions, just press enter a couple of times. The one thing that you just need to change is the port quantity, consumer 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. You need to now see a icon that reads 192.168.10.0, click on on this new icon and then click on on the Edit Shopper 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've got the above into the consumer choices windows click on the save button twice, which should return you to the primary Dhcp server window. Inside the dhcp server display screen, you see a button called Edit Network Interface, click on 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.

Ubuntu Tablet Pc Videos

No comments:

Post a Comment