The Duduls

Behind the Dudul
 
HomeRegisterLog in

Share | 
 

 Setting Router di Linux RedHat 9

View previous topic View next topic Go down 
AuthorMessage
zh0row
Duduls Junior
Duduls Junior


Male Number of posts : 169
Age : 34
Location : dudul room
Registration date : 2008-11-18

PostSubject: Setting Router di Linux RedHat 9   Mon Feb 02, 2009 11:50 am

Lagi nyoba belajar.......... Razz

IP Address yang tercantum dalam tutorial ini, hanya sebagai gambaran dalam melakukan setting saja, sehingga
jika dibuat manjadi sesuatu kenyataan di lapangan harap disesuaikan dengan kenyataan yang ada.
Berikut adalah skema jaringan yang akan dibangun :

Pertama yang harus di lakukan adalah mensetting serv(gateway utama) supaya bisa terhubung ke internet
Sebelum Mensetting :
1.Minta IP public ke ISP lengkap dengan netmask,broadcast dan dns nya
misalnya :
IP: 202.169.229.25
GATEWAY : 202.169.229.1
Nemast: 255.255.255.192
broadcast : 202.192.224.63
DNS1: 202.169.224.3
DNS2: 202.169.224.4

2.Menentukan IP local yang akan kita gunakan buat client

Setting IP serv :
1.[root@serv root]$ vi /etc/sysconfig/network
lalu isi dengan :

NETWORKING=yes
HOSTNAME=serv.domain.com
GATEWAY=202.169.229.1

lalu simpan dengan menekan :wq

2.Menconfigurasi IP eth0(default)

[root@serv root]$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
lalu isi dengan :

DEVICE=eth0
BOOTPROTO=static
IPADDR=202.169.229.25
BROADCAST=202.169.229.63
NETMASK=255.255.255.192
ONBOOT=yes
USERCTL=no

lalu simpan dengan menekan :wq

3.Setting dns resolve

[root@serv root]$ vi /etc/resolve.conf
lalu isi dengan nameserver dari isp kita tadi :

nameserver 202.169.224.3
nameserver 202.169.224.4

lalu simpan dengan menekan :wq

4.Setting ip_forwarding

[root@serv cachak]$ vi /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

simpan dengan menekan :wq

5.restart network
[root@serv cachak]$ /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 ]

[root@www root]#chkconfig –level 2345 network on
[root@www root]#

6.testing dengan ping ke default gateway 202.169.229.1

[root@serv root]$ ping 202.159.121.1
Pinging 202.169.229.1 with 32 bytes of data:
Reply from 202.169.229.1: bytes=32 time=10ms TTL=63
Reply from 202.169.229.1: bytes=32 time=10ms TTL=63
Reply from 202.169.229.1: bytes=32 time=10ms TTL=63
Reply from 202.169.229.1: bytes=32 time=10ms TTL=63

Ping statistics for 202.169.229.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 10ms, Average = 10ms

7.testing untuk ngeping google.com untuk ngecek dns nya
kalau muncul :
PING google.com (216.239.39.99) 56(84) bytes of data.
berarti dns kita untuk serv dah bekerja, tapi kalau muncul :
ping: unknown host google.com
berarti dns yang kita isikan di /etc/resolve.conf masih salah,silahkan cek lagi ke ISP nya

nah bereskan sudah setting IP untuk serv nya
supaya serv ini bisa sekaligus di gunakan sebagai ns server oleh client maka harus di install daemon bind atau daemon nameserver yang lain
atau kalau sudah ada tinggal hidupin Bind nya

[root@www root]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@www root]#chkconfig –level 2345 named on
[root@www root]#

misalnya ip ke client adalah :
192.168.0.1/24
IP : 192.168.0.1
netmask : 255.255.255.0
broadcast : 192.168.0.255
RANGE IP CLIENT : 192.168.0.2-192.168.0.254

Setting ip untuk eth1 (yang ke client)
1.memberi IP 192.168.0.1 di eth1
[root@serv cachak]$ vi /etc/sysconfig/network-scripts/ifcfg-eth1
lalu isi dengan :

DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
ONBOOT=yes
USERCTL=no

lalu simpan dengan menekan :wq

2.Restart networknya

[root@serv root]$ /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ 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 ]
Bringing up interface eth1: [ OK ]

3.Testing dengan cara ping ip eth1
[root@serv cachak]$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=63 time=0.356 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=63 time=0.269 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=63 time=0.267 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=63 time=0.268 ms

— 192.168.0.1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.267/0.290/0.356/0.038 ms

Tinggal Setting IP computer client dengan ketentuan di bawah ini :

IP: 192.168.0.2 - 192.168.0.254
GATEWAY: 192.168.0.1
NETMASK: 255.255.255.0
BROADCAST: 192.168.0.255
NAMESERVER: 192.168.0.1

misal :

Client01
===============================
IP: 192.168.0.2
GATEWAY: 192.168.0.1
NETMASK: 255.255.255.0
BROADCAST: 192.168.0.255
NAMESERVER: 192.168.0.1

Client02
===============================
IP: 192.168.0.3
GATEWAY: 192.168.0.1
NETMASK: 255.255.255.0
BROADCAST: 192.168.0.255
NAMESERVER: 192.168.0.1

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.0.1 dari client,kalau berhasil berarti client dan serv nya sudah tersambung.

Setting serv supaya client bisa internat dengan menggunakan NAT

1.Matikan iptablesnya

[root@serv root]# /etc/init.d/iptables stop
Flushing all chains: [ OK ]
Removing user defined chains: [ OK ]
Resetting built-in chains to the default ACCEPT policy: [ OK ]
[root@serv root]#

2.Tambahkan iptables untuk Source NAt sesuai dengan ip di eth0
[root@serv root]# /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j SNAT –to-source 202.159.121.2
[root@serv root]# /sbin/iptables-save > /etc/sysconfig/iptables
[root@serv root]# /etc/init.d/iptables restart
Flushing all current rules and user defined chains: [ OK ]
Clearing all current rules and user defined chains: [ OK ]
Applying iptables firewall rules: [ OK ]
[root@serv root]# iptables-save

sumber:
Spoiler:
 
Back to top Go down
View user profile
3may
Moderators
Moderators


Male Number of posts : 200
Age : 103
Location : cerbon
Registration date : 2008-12-31

PostSubject: Re: Setting Router di Linux RedHat 9   Thu Mar 05, 2009 1:07 pm

mantabs....
nice share brio

ane kemaren" ga bisa.....
pas liat post dari brio zh0row jadi bisa deh

thanks ya brio zh0row cocktail

_________________
viva www.dudul-online.net
Back to top Go down
View user profile
aokfi
Being Duduls
Being Duduls


Male Number of posts : 4
Age : 32
Registration date : 2009-02-19

PostSubject: Re: Setting Router di Linux RedHat 9   Thu Mar 05, 2009 11:37 pm

Thanks ya ndro infonya..

aku copas dulu ya.

Insya Allah, mau belajar linux...

Idea
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Setting Router di Linux RedHat 9   Today at 12:39 am

Back to top Go down
 
Setting Router di Linux RedHat 9
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Facebook enables facial recognition setting without warning users
» WHAT DO YOU THINK ABOUT, Setting the Record Straight on Veterans’ Support ?
» Setting Up a Limited company
» Passchendaele the moive: set pics
» Putin’s buddies setting him up

Permissions in this forum:You cannot reply to topics in this forum
The Duduls :: Computer & Technology :: Operating System :: Linux-
Jump to: