Make PC Router Simple With Debian Woody

1. Instalasi Operating System Linux Debian Woody
2. Ip addressing
#nano /etc/network/interface
auto eth0
allow-hotplug eth0
iface eth0 inet static


address 172.26.78.19
netmask 255.255.255.224
network 172.26.78.0
broadcast 172.26.78.31
gateway 172.26.78.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 124.81.116.2
dns-search smartlinkgm.net
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
broadcast 192.168.10.255


3. Setting Iptables
#iptables -A PREROUTING -t nat -j REDIRECT -p tcp -s 192.168.10.0/24 -d 0/0 –dport 80 –to-ports 8080 (apabila sudah ada squid)
#iptables -t nat -A POSTROUTING -o eth0 -s 192.168.10.0/24 -j MASQUERADE (belum ada squid)
#iptables -t nat -A POSTROUTING -o eth0 -s 192.168.10.0/24 -j MASQUERADE
#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
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 192.168.10.0/24 (di sesuaikan dengan network kita)
#/usr/sbin/squid -k reconfigure (restart squid)
untuk mengetest squid
#tail -f /var/log/squid/access.log
6. restart
# /etc/init.d/networking restart
Reconfiguring network interfaces…done.
Ok Jadilah sebuah PC Router sederhana, konfigurasi seperti diatas sudah cukup aman dan secure..

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Post a Comment