CV-Kanya minta di buatkan server untuk share koneksi Internetnya
berikut rule di slackware 12.1
#!/bin/sh
#by YonCrew for kanya jakarta
# ke ISP speedy
wan=eth0
# ke jaringan lan kantor
lan=eth1
# lokasi path iptables binary
IPTABLES=/usr/sbin/iptables
#
$IPTABLES -F FORWARD
$IPTABLES -P FORWARD DROP
$IPTABLES -A FORWARD -i $lan -o $wan-j ACCEPT
$IPTABLES -A FORWARD -i $wan -o $lan -m state --state ESTABLISHED,RELATED -j ACCEPT
# aktifkan masquerade
$IPTABLES -t nat -F POSTROUTING
$IPTABLES -t nat -A POSTROUTING -o $wan-j MASQUERADE
#aktifkan packet forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
rule tersebut letakkan di /etc/rc.d/rc.local
No comments:
Post a Comment