Contoh Konfigurasi file rc.local beserta keterangannya
#!/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. /sbin/ifconfig eth0 192.168.0.2 netmask 255.255.255.0 /sbin/ifconfig eth0 up /sbin/ifconfig vboxnet0 192.168.0.1 netmask 255.255.255.0 /sbin/ifconfig vboxnet0 up #$$$ #yang 2 ini untuk sharing internet / ics /sbin/sysctl -w net.ipv4.ip_forward=1 /sbin/iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE #isi DNS dengan DNS google yaitu 8.8.8.8 dan 8.8.4.4 # sharing internet / ics selesai #$$$ #!!! #yang 2 ini untuk memforward paket date ke eth0 dan port 3128 punya squid /sbin/iptables -t nat -A PREROUTING -i vboxnet0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.2:3128 /sbin/iptables -t nat -A PREROUTING -i e...