In this particular article you’ll understand how to setup the especially individual ubuntu router internet router. The ubuntu router / gateway can act precisely like any different router you are able to purchase found on the store, besides a linux box may have additional functionality plus additional safety. What you should build a Ubuntu Router Internet Gateway:
* Extra computer
* (2) Ethernet cards
* Switch
* Ubuntu 8.04 LTS Server Version
* Putty
This post may explain strategies for you to setup a fresh install of Ubuntu 10.04 host edition, configuring a dhcp host for an location community,while a including a firewall within the nasty web. The initial thing you are going to do is a fresh set up of the Ubuntu host edition, yet selecting only Open SSH host throughout the program set up section of the Ubuntu install. After the set up completes plus a computer reboots, you’re then going to want to set a root password (su).
sudo passwd root
After you have a set a root password, login into root by typing the following command:
su
After you are inside super individual mode (root) we’re then going to wish To substitute the Ubuntu Bistro. Kind the following instructions to substitute the os plus different programs.
apt-get replace
apt-get improve
After the computer updates, restart it.
reboot
Setup Network Cards
vi /etc/network/interfaces
Within the example under my eth0 represents the community interface which links to the web as well as the eth1 interface connectsto the switch. The switch then links to a whole different networked equipment, reminiscent of the gaming program plus additional networked equipment. I added the following code into the /etc/network/interfaces file:
Vi /etc/network/interfaces
car 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 are not necessary, nonetheless I want to set a hostname for my router, all it’s a should to do is set up apache plus we may have the individual individual intranet or web host.
vi /etc/hosts
echo homeserver.gateway.2wire.net > /etc/hostname
/etc/init.d/hostname.sh start
hostname
hostname -f
Ubuntu Hostname
When we have completed the upcoming above, you really need to use putty to entry the linux machine from a windows based computer. This can allow we to copy plus paste the following code, to rush up the procedure of creating the linux gateway. The initial thing which you must do to utilize putty to configure the Ubuntu router, is prepared a static ip approximately a house windows machine, because you never have a dhcp host submit yet. Set a static ip deal with for Microsoft Vista.When we don’t want to employ putty you are able to simply type out the rest of the code, putty just makes it simpler. Once we have selected a terminal system which the will use, again login under root. It is now time to install several software, which you may wish 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 allow packet forwarding for IPv4
web.ipv4.ip_forward=1
echo 1 > /proc/sys/net/ipv4/ip_forward
Install Webmin
Webmin is anther wise system to use to configure we ubuntu router plus additional host programs which we merely can employ. If you utilize webmin, you are capable to conveniently configure we host, using any internet browser we select.
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 are requested merely a some issues, simply hit enter a couple of instances. The something which we only should alter is the port amount, customer title plus password & state 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 mentioned visit found on the create switch. You should now see a icon which reads 192.168.10.0, visit approximately this brand-new icon plus then visit found on the Edit Shopper Choices switch.
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 received the above mentioned into the customer options windows visit the conserve switch twice, that could return we to the main Dhcp host window. Inside the dhcp host show screen, we see a switch called Edit Network Interface, visit this switch plus select eth1 then click conserve. Then visit the Begin Sever switch, if you see no mistakes, you’re superior.
Configure firewall
Input:
Accept when input interface is lo
Accept when input interface is eth0 plus state of connection is ESTABLISHED,RELATED
Accept when input interface is eth1
Forward:
Accept when input interface is eth0 plus output interface is eth1 plus state of connection is ESTABLISHED,RELATED
Accept when input interface is eth1 plus output interface is eth0
Then which concludes how to build your Ubuntu Router Internet Gateway.
Debian Based Internet Gateway
No comments:
Post a Comment