Make Pc Router With Ubuntu Server

Pc Router is a PC (computer) that made a router.Yang which itself Router is a networking tool that sends data packets through a network or the Internet to the destination is through a process of routing.



Router functions as a liaison between two or more networks to carry data from one network to build a Pc lainnya.Untuk I use my Router Operating System (OS), Linux Ubuntu Server you can download 9:04 disni
.



For the computer I use the computer with the following specifications:
1. Intel Pentium 4 2.6 Ghz
2. 512 MB Memory
3. Harrdisk 40 GB
4. 2 Fruit Nic (network card)

-NIC 1 (eth0) connected to an existing client LAN dijaringan
-NIC 2 (eth1) connected to a server or router

Before configuring, you must have an IP address, Subnetmask, Broadcast address and defaul gateway which can be obtained from your ISP (internet service provider) which you subscribe.

Installing Ubuntu server to complete, here I am using ubuntu server 9.04. After the installation is completely finished, enter the username and password that we created earlier when installing ubuntu server.


The steps and commands to pengkonfigurasian as follows:

-Login as root, so we can have full and unrestricted access.

# Sudo su

-Enter the root password
-Configuring the NIC 1 (eth0) and NIC 2 (eth1)

# Nano / etc / network / interfaces

Fill Ip-Address, Netmask and Broadcast in accordance with yours

# The loopback network interface
auto lo eth0 eth1
IFACE lo inet loopback
allow-hotplug eth0

# The primary network interface
IFACE eth0 inet static
address 192.168.0.99
netmask 255.255.255.0
broadcast 192.168.0.255

IFACE eth1 inet static
address 192.168.1.20
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.10

Press Control-X and Y enter to save
-Check Ip, whether already benar2 entered with the command

# Ifconfig

-Entering DNS

# Nano / etc / resolv.conf

Its DNS-Fill
Nameserver 192.168.1.10 / / I fill with Ip gateways
Nameserver 192.168.1.20 / / Ip eth1

Press Control-X and Y enter to save

Restart the network for setting-we can function

# / Etc / init.d / networking restart

Network-process is finished, now get in on the process of routing
Activating Ip_forward-way

# Echo "1"> / proc/sys/net/ipv4/ip_forward

Enter the command iptables-to mensharing internet from eth1 to eth0

# Iptables-t nat-A POSTROUTING-o eth1-j MASQUERADE

Ip-Me Routing client that we use on a LAN network

# / Sbin / iptables-t nat-A POSTROUTING-j MASQUERADE-s 192.168.0.99/192.168.0.200

-To be ordered not lost when the computer is restarted, save the command in the rc.lokal

# Nano / etc / rc.lokal

Retype re-did the iptables command above said exit = 0

iptables-t nat-A POSTROUTING-o eth1-j MASQUERADE
/ Sbin / iptables-t nat-A POSTROUTING-j MASQUERADE-s 192.168.0.99/192.168.0.200
echo "1"> / proc/sys/net/ipv4/ip_forward

-Do not forget the save by pressing Control X and Y enter
Restart re-setting networknya

# / Etc / init.d / networking restart

To ensure eth0, eth1 and internet connections are already connected, do ping one by one

# Ping 192.168.0.99 / / eth0
# Ping 192.168.1.20 / / eth1
# Ping www.google.com

If the reply then he has been connected and the client ip settings
Fill with:
Ip address 192.168.0.99-200
Subnet 255.255.255.0
Gateway 192.168.1.20 / / fill with eth1 ip
Dns server 192.168.1.20 / / ip nameserver that we created earlier as the DNS

Check with ping from client to server eth0 and eth1 and then from client to client. Open a browser on the client and the internet connection test, if it runs then you have successfully created a PC ROUTER.

To make this, you can install squid proxy servers and other tolls2 you feel is necessary