Home » » Routing Debian

Routing Debian

Written By Unknown on Tuesday, 8 January 2013 | 22:44

Routing

Mengkonfigurasi IP Address server
fiantkj:~# nano /etc/network/interfaces

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 100.100.100.6
        netmask 255.255.255.0
        network 100.100.100.0
        broadcast 100.100.100.255
        gateway 100.100.100.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 100.100.100.1
        dns-search fiantkj.net
auto eth1
iface eth1 inet static
        address 192.168.6.1
        netmask 255.255.255.0
        network 192.168.6.0
        broadcast 192.168.6.255

Mengkonfigurasi NAT dari rc.local dengan menambahkan
iptables -t nat -A POSTROUTING -j MASQUERADE atau
iptables -A POSTROUTING -t nat -o eth0 -J MASQUERADE sebelum kata exit 0
fiantkj:~# nano /etc/rc.local

#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any   other # value on error. # # In order to enable or disable this script just change the execution # bits. #
# By default this script does nothing.
iptables -t nat -A POSTROUTING -j MASQUERADE     --pilih salah satu--
iptables -A POSTROUTING -t nat -o eth0 -J MASQUERADE    --pilih salah satu--
exit 0
#Tambahkan script di network option
#fiantkj:~# nano /etc/network/option

#ip_forward = yes
#spoofprotect = yes
#syncookies = no
Menghilangkan tanda #
fiantkj:~# nano /etc/sysctl.conf
#net.ipv4.ip_forward=1
 Menrestart konfigurasi yang telah di buat tadi.
fiantkj:~# /etc/init.d/networking restart
Reconfiguring network interfaces...done.
Share this post :

Post a Comment

 
Support : Creating Website | Portal-jarkom Template | Portal-Jarkom Template
Copyright © 2011. Belajar IT Lebih Mudah - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger