Oleh: kfcngalah | Maret 18, 2009

PC-ROUTER DENGAN CENTOS

1. Siapkan PC seadanya.. Pentium II / III juga boleh..

2. Pastikan CPU anda memiliki 2 Lan card ( 1 untuk internet, 1 untuk LAN )

3. Install Linux didalamnya

4. Asumsi : eth0 -> Untuk LAN dan eth1 -> untuk Internet

5. [root@server ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

# 3Com Corporation 3c905C-TX/TX-M [Tornado]
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:01:02:92:9a:cf
IPADDR=192.168.2.1
NETMASK=255.255.255.0
NETWORK=192.168.2.0
BROADCAST=192.168.2.255

6. [root@server ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1

# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:50:bf:12:6e:3e
IPADDR=202.x.x.x

NETMASK=255.255.255.240
NETWORK=202.x.x.x

BROADCAST=202.x.x.x

7. [root@server ~]# vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=server.toink.net
GATEWAY=202.x.x.x -> Sesuaikan dengan gateway anda
GATEWAYDEV=eth1 -> Sesuaikan dengan ethernet ke Internet
NOZEROCONF=yes

8. [root@server ~]# vi /etc/sysctl.conf

# Controls IP packet forwarding
net.ipv4.ip_forward = 1 -> Defaultnya 0 rubah menjadi 1

9. search tukul.net -> Sesuaikan dengan DNS Server anda

nameserver 202.x.x.x

nameserver 202.x.x.x

10. Restart Service Network : [root@server ~]# service network restart

11. Setting iptables :

iptables -t nat -A POSTROUTING -s 192.168.2.0/255.255.255.0 -o eth1 -j SNAT –to-source 202.x.x.x

12. [root@server ~]# iptables-save

Sampai disini PC Router sudah siap dipakai.

Setting IP di client :

192.168.2.2 / 255.255.255.0

Gateway : 192.168.2.1


Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Kategori

%d blogger menyukai ini: