Linux IP Masquerade Onno W. Purbo
Linux di COMDEX 2000
Referensi HOWTO IP-Masquerade
RFC 1597 – IP Private 10.x.x.x x.x x.x
Topologi Sederhana
Aktifkan IP Forwarding
Edit /proc/sys/net/ipv4/ip_forward /]# echo "1" > /proc/sys/net/ipv4/ip_forward Edit /etc/sysconfig/network FORWARD_IPV4=true
Check Modul /]# cd /lib/modules/ /ipv4/ ipv4]# ls ip_gre.o ip_masq_ftp.o ip_masq_portfw.o ip_masq_user.o rarp.o ip_masq_autofw.o ip_masq_irc.o ip_masq_quake.o ip_masq_vdolive.o ip_masq_cuseeme.o ip_masq_mfw.o ip_masq_raudio.o ipip.o
Panggil Modul ipv4]# modprobe -a *
Check Panggil Modul ipv4]# lsmod. ip_masq_vdolive (unused) ip_masq_user (unused) ip_masq_raudio (unused) ip_masq_quake (unused) ip_masq_portfw (unused) ip_masq_mfw (unused) ip_masq_irc (unused) ip_masq_ftp (unused) ip_masq_cuseeme (unused) ip_masq_autofw (unused) ip_gre (unused)
Konfig IP Forward & Firewall ipchains -A forward -s yyy.yyy.yyy.yyy/x -j MASQ Perintah -Amenambahkan rule -Imenyisipkan (insert) rule firewall ke baris paling atas -Dmenghapus rule yg telah dibuat -ssource address -ddestination address MASQ Masquerading DENYMencegat
Contoh Masquerade ipchains -A forward -s /24 -d /0 -j MASQ ipchains -I input -s /32 -d 0/0 -j DENY ipchains -I input -s /32 -d 0/0 -j DENY
Contoh Blokir IRC ipchains -I input -s /32 -d 0/ j DENY -p tcp ipchains -D input -s /32 -d 0/ j DENY -p tcp