My Weblog

Just another WordPress.com weblog

Membuat Internet Gateway Di Fedora Core 5

 Membuat Internet Gateway Di Fedora Core 5

Sebelum memulainya kita harus tahu dulu info lengkap dari ISP seperti : IP Address, NetMask, DNS Server dll pokoknya harus lengkap. Dan jangan lupa berdoa, sediakan cemilan dan minuman ringan biar nggak stress.

Contoh :

Konfigurasi WAN :
IP Address = 192.168.1.100
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
DNS = 192.168.1.1

Konfigurasi LAN :
IP Address = 192.168.0.1
NETMASK = 255.255.255.0

Tahap pertama | Topologi Jaringan

Internet — Internet Gateway — Client

Tahap kedua | Konfigurasi eth0 (To Internet / Modem ADSL)

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:18:f3:23:87:79
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.1.100
GATEWAY=192.168.1.1

Tahap ketiga | Konfigurasi eth1 (To LAN)

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1

ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth1
HWADDR=00:40:f4:4f:fa:27
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.0.1

Tahap keempat | Konfigurasi Name Server (DNS)

[root@localhost ~]# vi /etc/resolv.conf

search localdomain
nameserver 192.168.1.1

Tahap kelima | Konfigurasi ipv4 forwarding

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

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 0

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

Tahap keenam | Konfigurasi Internet Sharing (IPTables)

[root@localhost ~]# vi /etc/sysconfig/iptables

# Generated by iptables-save v1.3.5 on Mon Nov 19 19:23:54 2007
*nat
:PREROUTING ACCEPT [59:7516]
:POSTROUTING ACCEPT [532:36819]
:OUTPUT ACCEPT [527:36516]
-A POSTROUTING -s 192.168.0.0/255.255.255.0 -o eth0 -j SNAT –to-source 192.168.1.100

atau

-A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE (Jika eth0 menggunakan DHCP)

# Completed on Mon Nov 19 19:23:54 2007
Tahap ketujuh | Aktifkan service

[root@localhost ~]# /etc/init.d/iptables restart
[root@localhost ~]# /etc/init.d/network restart
Selamat mencoba dan semoga berhasil :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: