![]() |
||
Saya dapat tugas membuat PC Router dengan Debian 4.0
bahan-bahan,eh maksudnya langkah-langkah dalam bekerja 1. Pastikan PC sudah terinstal opertaing system Debian 4 2. konfigurasi ip address #nano /etc/network/interface auto eth0 allow-hotplug eth0 iface eth0 inet static address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx. network xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx # dns-* options are implemented by the resolvconf package, if installed dns-nameservers xxx.xxx.xxx.xxx dns-search latihan.com (nama domain yang kita inginkan) auto eth1 iface eth1 inet static address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx 3. Setting Iptables #iptables -A PREROUTING -t nat -j REDIRECT -p tcp -s xxx.xxx.xxx.xxx -d 0/0 --dport 80 --to-ports 8080 (apabila sudah ada squid) #iptables -t nat -A POSTROUTING -o eth0 -s xxx.xxx.xxx.xxx -j MASQUERADE (apabila belum ada squid) #iptables -t nat -L #iptables-save #iptables-save > /etc/iptables.conf #echo "iptables-restore < /etc/iptables.conf" >> /etc/network/if-up.d/iptables #chmod 755 /etc/network/if-up.d/iptables 4. Setting ip forward #nano /etc/sysctl.conf (hilangkan tanda kunci "#" pada ![]() net.ipv4.conf.default.rp_filter=1 net.ipv4.ip_forward =1 net.ipv4.conf.default.forwarding=1 net.ipv6.conf.default.forwarding=1 #sysctl -p /etc/sysctl.conf -A (untuk merestart ip forward) #sysctl -A|grep forward 5. Setting Squid #apt-get install squid setelah itu configure di #nano /etc/squid/squid.conf yang di konfigure antara lain http_port 3128 transparent our_networks xxx.xxx.xxx.xxx (di sesuaikan dengan ip network kita) #/usr/sbin/squid -z (membuat swap directory yang dibutuhkan squid) #/usr/sbin/squid -sYDF (menjalankan squid) #/usr/sbin/squid -k reconfigure (restart squid) untuk mengetest squid #tail -f /var/log/squid/access.log 6. setelah itu restart networking # /etc/init.d/networking restart Reconfiguring network interfaces...done. jadilah sebuah router PC sederhana http:\firdauslinux.wordpress.com http:\prasztyo.blogspot.com |
|
|
![]() |