dari grub prompt, larikan arahan di bawah:
set root=(hd0,1)
linux /boot/vmlinux-2.6.38-8-generic root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.38-8-generic
boot
kemudian boot. Lepas boot:
sudo grub-install /dev/sda
sudo update-grub
#!/bin/shiptables -F INPUT
iptables -F OUTPUT
Cara baca rules berbeza dengan pf, bila dah match rules pada line tertentu, tak baca lagi rules yg kat bawah. Sama macam 'quick' dalam pf.iptables -F FORWARDiptables -P INPUT DROPiptables -P OUTPUT DROPiptables -P FORWARD DROP#Permit DNS trafficiptables -A INPUT -p udp --sport 53 -j ACCEPTiptables -A OUTPUT -p udp --sport 53 -j ACCEPT#Accept local-network return traffic for clientsiptables -A INPUT -m state -p tcp --dport 1024:65535 --state ESTABLISHED,RELATED -s 192.168.9.0/24 -j ACCEPTiptables -A OUTPUT -m state -p tcp --dport 1024:65535 ! --state INVALID -d 192.168.9.0/24 -j ACCEPT#Accept local (192.168.9.0/24) SSH trafficsiptables -A INPUT -m state -p tcp --dport 22 ! --state INVALID -s 192.168.9.0/24 -j ACCEPTiptables -A OUTPUT -m state -p tcp --sport 22 --state ESTABLISHED,RELATED -d 192.168.9.0/24 -j ACCEPT
block in on em0keterangan:
pass in on em0 from 10.0.1.0/24
block in on em0keterangan:
block in quick on em0 from 10.0.1.34
pass in on em0 from 10.0.1.0/24