|
|
|
|
|
|
Just share knowladge, if there some mistake mail me to
sidik.pujiarahman@gmail.com. Pada paper ini penulis menggunakan linux fedora core.
Example, idea from warnet!.
1.Router ADSL dll.
2.komputer Linux Fedora Core (sebagai server)+ 2 line card:
a.eth0, Line external ---> to router
b.eth1, Line Internal ---> to switch
3.Switch / Hub.
4.Komputer Client.
Pertama yang harus di lakukan adalah setting dan konfigurasi linux gateway supaya bisa connect
ke internet.
Sebelum Mensetting, usahakan anda telah memiliki IP Publik dari ISP dimana anda mendaftar,
jika belum segeralah bergegas :D untuk memintanya.
1.Minta IP public ke ISP misalkan telkom.net
ISP : 222.124.37.19
DNS1 : 202.134.0.155
DNS2 : 202.134.0.1.5
2.Diaharapkan anda sudah mensetting router anda.
ip publik : 222.124.37.19
ip local : 192.168.0.254
3.idea (linux server gateway)
eth0 <-- line ke router
ip : 192.168.0.250
netmask : 255.255.255.0
Gateway : 192.168.0.254
broadcast: 192.168.0.255
eth1 <-- line ke hub/switch
ip : 192.168.1.254
netmask : 255.255.255.0
Gateway : 192.168.0.250
Broadcast: 192.168.0.255
4.Menentukan IP local yang akan kita gunakan buat client
Setting IP Gateway Linux server.
Setting HostName.
#pico /etc/sysconfig/network/devices
lalu isi dengan :
DEVICE : eth1
ON BOOT : YES
BOOT PROTO : NONE
IP ADDR : 192.168.1.254
NETMASK : 255.255.255.0
TYPE : ETHERNET
USER CTL : NO
PEER DNS : YES
IPV6 INIT : NO
GATEWAY : 192.168.0.250
#save.
5.Menconfigurasi IP eth0(default)
#pico /etc/sysconfig/network/devices
lalu isi dengan :
DEVICE : eth0
ON BOOT : YES
BOOT PROTO : NONE
IP ADDR : 192.168.0.250
NETMASK : 255.255.255.0
TYPE : ETHERNET
USER CTL : NO
PEER DNS : YES
IPV6 INIT : NO
GATEWAY : 192.168.0.254
#save.
6.Setting dns resolve
#pico /etc/resolve.conf
lalu isi dengan nameserver dari isp kita tadi :
nameserver 202.134.0.155
nameserver 202.134.1.5
#save.
7.Setting ip_forwarding
#pico /etc/sysctl.conf
Rubah net.ipv4.ip_forward = 0 menjadi net.ipv4.ip_forward = 1
atau kalau gak ada net.ipv4.ip_forward = 0 tambahin net.ipv4.ip_forward = 1
jika ingin lebih gampang tinggal add saja :
modeprobe IPtable-nat
echo1> /proc/sys/net/ipv4/ip-forward
iptables -t nat -A POSTROUTING -o eth0 -j masquerade
#save.
8.restart network
# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
9.testing dengan ngeping ke default gateway 192.168.0.254
# ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
64 bytes from 192.168.0.254: icmp_seq=1 ttl=60 time=0.356 ms
64 bytes from 192.168.0.254: icmp_seq=2 ttl=60 time=0.269 ms
64 bytes from 192.168.0.254: icmp_seq=3 ttl=60 time=0.267 ms
64 bytes from 192.168.0.254: icmp_seq=4 ttl=60 time=0.268 ms
--- 192.168.0.254 ping statistics ---
10.packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.267/0.290/0.356/0.038 ms
10.testing untuk ngeping telkom.net untuk ngecek dns nya
kalau muncul : PING telkom.net bytes of data.
berarti dns kita untuk Internet gateway dah bekerja, tapi kalau muncul :
ping: unknown host telkom.net
berarti dns yang kita isikan di /etc/resolve.conf masih salah,silahkan cek lagi ke ISP nya :)
11. Komputer client
Tinggal Setting IP computer client dengan ketentuan di bawah ini :
IP CLIENT : 192.168.1.0 -- 192.168.1.254
GATEWAY : 192.168.1.254
NETMASK : 255.255.255.0
DNS SERV : 202.134.0.155
misal :
Client01
===============================
IP : 192.168.1.1
GATEWAY : 192.168.1.254
NETMASK : 255.255.255.0
DNS SERV : 202.134.0.155
: 202.134.2.5
Client02
===============================
IP : 192.168.1.2
GATEWAY : 192.168.1.254
NETMASK : 255.255.255.0
DNS SERV : 202.134.0.155
: 202.134.2.5
dan seterusnya sesuai banyaknya client,yang berubah hanya IP
untuk client windows maka setting IP di bagian Start Menu/Setting/Control Panel/Network
setelah di setting ip client, maka coba ping ke 192.168.1.254 dari client,kalau berhasil berarti
Server gateway telah tersambung dan client siap menggunakan internet
thansk to :
allah swt.
paman google.
linux site.
Nditz url http://suhaemi.tk
white paper.
selamat mencoba
|
Linux Server Internet Gateway |
|
|
|
|
Ditulis oleh sidik pujiarahman
|
|
Tuesday, 12 September 2006 |
|
|
|
Terakhir diperbaharui ( Tuesday, 12 September 2006 )
|
Number of comments (0) - Add your comments to this article... You are not authorized to leave comments - please login. |
| |
|
|
|