(1) Uninstall network-manager dan install dhcp3-server:
# apt-get remove network-manager
# apt-get install dhcp3-server
(2) Edit /etc/network/interfaces:
auto lo eth0 eth1(3) Edit /etc/sysctl.conf ubah:
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet static
network 192.168.0.0
address 192.168.0.1
broadcast 192.168.0.255
netmask 255.255.255.0
net.ipv4.ip_forward=1(4) Edit /etc/dhcp3/dhcpd.conf; isi ISI-IP-DNS-1 dan ISI-IP-DNS-2 dengan alamat DNS server terkait.
option routers 192.168.0.1;(5) Edit /etc/rc.local:
ignore client-updates;
option domain-name-servers ISI-IP-DNS-1, ISI-IP-DNS-2;
default-lease-time 1200;
max-lease-time 3600;
authoritative;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.20 192.168.0.250;
option routers 192.168.0.1;
option ip-forwarding off;
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
# static IP
host pamulang-mobile {
hardware ethernet 00:1b:38:da:5a:d6;
fixed-address 192.168.0.2;
}
}
subnet 192.168.1.0 netmask 255.255.255.0 {
}
subnet 192.168.2.0 netmask 255.255.255.0 {
}
#!/bin/sh -e(6) Reboot saja sekalian, mengecek apakah sysctl.conf-nya berfungsi.
#
# rc.local
#
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/bin/sleep 1;
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/bin/sleep 1;
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
/bin/sleep 2;
DISCLAIMER
This is HOW Me Do IT! Grrr... this blog memo is mainly written for OWN PURPOSES. This post is based on "Google Here, There, and Everywhere". Whether this is PLAGIARY or RESEARCH, there has never been a claim that this is an original work, nor is it necessarily the best solution, and not for Scopus consumption :). Please provide feedback, especially if you have alternative explanations. Hopefully, this note will be helpful in the future when you have forgotten how to solve this trivia problem.
DISKLAIMER
INIlah yang KUlakukan! Grrr... memo blog ini terutama ditulis untuk KEPERLUAN SENDIRI. Tulisan ini berbasis "Google Sana, Google Sini, Coba Itu, Coba Ini, Lalu Tanya-tanyi". Entah ini PLAGIAT, entah ini RISET, yang jelas tidak pernah ada klaim bahwa ini merupakan karya asli, serta belum tentu pula merupakan solusi terbaik, serta bukan untuk konsumsi Scopus :). Mohon kiranya memberikan tanggapan, terutama jika memiliki solusi alternatif. Semoga catatan ini akan bermanfaat di masa mendatang, saat sudah lupa cara menyelesaikan masalah trivia ini.
This is the Way!







