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
:P REROUTING ACCEPT [59:7516]
:P OSTROUTING 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)

  • Trackback are closed
  • Komentar (0)

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

%d blogger menyukai ini: