Meng-aktikan root
Dengan perintah di bawah ini….
# sudo passwd —enter (masukin pass sekarang, buat pass baru untuk root)
# su — enter (masukin pass root)
seting ip address, gunakan program editing kesayangan anda, disini saya pakai
#nano /etc/network/interface
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168..1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.134.0.155
dns-search smkcokro.kotamobagu.org
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
Restart network
root@ubuntu:~# /etc/init.d/networking restart
* Reconfiguring network interfaces… [ OK ]
Lihat hasil dari configurasi ip address dengan perintah
root@ubuntu:~# ifconfig
root@ubuntu:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:c9:2f:37
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec9:2f37/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:882 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:95253 (93.0 KB) TX bytes:36154 (35.3 KB)
Interrupt:17 Base address:0×1400
eth1 Link encap:Ethernet HWaddr 00:0c:29:c9:2f:41
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec9:2f41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1378 (1.3 KB) TX bytes:328 (328.0 B)
Interrupt:18 Base address:0×1480
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
test ping ke geteway isp
root@ubuntu:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.655 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.348 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.335 ms
ok.
Lanjut dengan seting DNS
root@ubuntu:~# nano /etc/resolv.conf
nameserver 192.168.1.1 (ganti dengan IP DNS dari ISP)
test ping ke internet, contoh ping ke google
root@ubuntu:~# ping gogole.com
PING gogole.com (64.233.161.104) 56(84) bytes of data.
64 bytes from od-in-f104.google.com (64.233.161.104): icmp_seq=1 ttl=235 time=293 ms
64 bytes from od-in-f104.google.com (64.233.161.104): icmp_seq=2 ttl=235 time=294 ms
Ok,
Update ubuntu
root@ubuntu:~# apt-get update
root@ubuntu:~# apt-get upgrade (akan memakan waktu) tunggu sampai selesai
Dilanjutakan dengan Seting Internet sharing,
Ket configurasi iptables NAT
--> IP ke internet = 192.168.1.254 interfaces (eth0)
--> IP ke LAN = 192.168.0.1 interfaces (eth1),
iptables -A POSTROUTING -j MASQUERADE -t nat -s (iplan) -o (interface ke internet)
iptables -A FORWARD -i (interface ke LAN) -s (ipLAN) -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward (untuk mengaktifkan ip forward)
Dari keterangan diatas bisa kita ambil contoh dari parameter ip address yang kita seting diatas yaitu :
IP ke internet = 192.168.1.254 interfaces eth0
IP ke LAN = 192.168.0.1 interfaces eth1, jadi hasilnya seperti dibawah
iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0
iptables -A FORWARD -i eth1 -s 192.168.0.0/24 -j ACCEPT
Buka file /etc/rc.local, file ini sama fungsinya dengan autoexec.bat di window, fiel ini akan di jalankan waktu proses starup,
root@ubuntu:~# nano /etc/rc.local
sisipkan baris perintah ip tables diatas di bawah kata exit 0
IP ke internet = 192.168.1.254 interfaces eth0
IP ke LAN = 192.168.0.1 interfaces eth1, jadi hasilnya seperti dibawah
root@ubuntu:~# iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0
root@ubuntu:~# iptables -A FORWARD -i eth1 -s 192.168.0.0/24 -j ACCEPT
Mengaktifkan ip_forward
root@ubuntu:~# echo 1 > /proc/sys/net/ipv4/ip_forward
jalankan perintah ini biar ngak perlu restart
root@ubuntu:~# nano /etc/rc.local
Buka file /etc/rc.local, file ini sama fungsinya dengan autoexec.bat di window, fiel ini akan di jalankan waktu proses starup,
root@ubuntu:~# nano /etc/rc.local
sisipkan baris perintah ip tables diatas di bawah kata exit 0
Kemudian ketikan scrip iptables ke file rc.local
Hasilnya jadi seperti di bawah ini….
#!/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.
iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0
iptables -A FORWARD -i eth1 -s 192.168.0.0/24 -j ACCEPT
exit 0
Selanjutnya reboot system computer anda…
Dengan perintah
root@ubuntu:~# reboot
Kamis, 2009 Februari 19
Sabtu, 2008 Agustus 23
I'll always try to make u happy.
Whatever......although isn't perfect but i hope, u can accept that.
u always in my heart. for now and forever. Only you.
Thanks for all. for everything....
For everything which u give me. Ur kindness, ur attentive, ur love.... everything. And.....
i hope, u always patient to face me. all there which me.
i so love you.... only you.
"rn-260989-
Whatever......although isn't perfect but i hope, u can accept that.
u always in my heart. for now and forever. Only you.
Thanks for all. for everything....
For everything which u give me. Ur kindness, ur attentive, ur love.... everything. And.....
i hope, u always patient to face me. all there which me.
i so love you.... only you.
"rn-260989-
Selasa, 2008 Juli 29
new energy
Akhirnya semua kayak baru lagi. hehehe... komputer gw yang penuh master dan data. akhirnya ilang.. ke partisi.. mo pake get data back males nyarinya. jadi gw yakinin hati buat bikin baru semua. tinggal nambah ram aje jadi 512. Walaupun komputer gw jadul dengan spek yang terbatas :
- ram DDR 128 M + 256 M
- processor intel celeron 1.6 Ghz
- Mboard PcPartner
- monitor 14"
- mouse + keyboard standard
- hd 40G + 40G
- os windows darklite v6.0
biar begitu tapi tetep gw bisa bilang lumayan. karena masih bisa browsing, ngetik, ngeprint, yng paling penting masih bisa di pake buat kerja
Pas lagi denger lagunya BIP - bintang hidupku, sampai nanti, cinta pertama.Gw jadi semangat dan terinspirasi dan langsung inget ma bokin. dia mentari gw.. mudah-mudahan gw ma dia langgeng ampe salah satu dari gw ma dia mati.
- ram DDR 128 M + 256 M
- processor intel celeron 1.6 Ghz
- Mboard PcPartner
- monitor 14"
- mouse + keyboard standard
- hd 40G + 40G
- os windows darklite v6.0
biar begitu tapi tetep gw bisa bilang lumayan. karena masih bisa browsing, ngetik, ngeprint, yng paling penting masih bisa di pake buat kerja
Pas lagi denger lagunya BIP - bintang hidupku, sampai nanti, cinta pertama.Gw jadi semangat dan terinspirasi dan langsung inget ma bokin. dia mentari gw.. mudah-mudahan gw ma dia langgeng ampe salah satu dari gw ma dia mati.
Selasa, 2008 Maret 25
iptables.txt iptables
IPTABLES adalah sebuah packet program yang dimiliki oleh linux.
pada postingan ini saia akan memberi tips agar kita dapat menjalankan iptables dengn mudah.
persiapan yang dibutuhkan juga sangat mudah. cukup dengan menginstal text editor seperti vi, nano, & tex editor lainya. pastinya anda juga harus mengetahui rule dari iptables.
kita memang bisa menjalankan langsung perintah untuk iptables, tapi jika firewall menglami eror maka kita akan membuat ulang perintah-perintah yang telah kita jalankan. untuk mengatasi itu semua, maka kita akan membuat suatu file yang bisa menjalankan beberapa perintah iptables sesuai dengna kebutuhan.
buatlah sebuah file baru dengan nama iptables dengna menggunakan text editor.
kemudian masukan perintah iptables. seperti dibawah ini.
##################### START #######################
#flush tables
iptables -F
#ip forward
echo 1 > /proc/sys/net/ipv4/ip_forward
# DUMP
iptables -N DUMP > /dev/null
iptables -F DUMP
iptables -A DUMP -p tcp -j LOG
iptables -A DUMP -p udp -j LOG
iptables -A DUMP -p tcp -j REJECT --reject-with tcp-reset
iptables -A DUMP -p udp -j REJECT --reject-with icmp-port-unreachable
iptables -A DUMP -j DROP
# Stateful table
iptables -N STATEFUL > /dev/null
iptables -F STATEFUL
iptables -I STATEFUL -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A STATEFUL -m state --state NEW -i ! eth0 -j ACCEPT
iptables -A STATEFUL -j DUMP
# loopback rules
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# drop reserved addresses incoming (these are reserved addresses
# but may change soon
iptables -A INPUT -i eth0 -s 0.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 1.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 2.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 5.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 7.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 10.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 23.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 27.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 31.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 36.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 39.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 41.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 42.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 58.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 59.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 60.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 127.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 169.254.0.0/16 -j DUMP
iptables -A INPUT -i eth0 -s 172.16.0.0/12 -j DUMP
iptables -A INPUT -i eth0 -s 192.168.0.0/16 -j DUMP
iptables -A INPUT -i eth0 -s 197.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 224.0.0.0/3 -j DUMP
iptables -A INPUT -i eth0 -s 240.0.0.0/8 -j DUMP
#set iptables to allow everything from my work network
iptables -A INPUT -i eth0 -p all -s 202.0.0.0/8 -j ACCEPT
iptables -A INPUT -i eth0 -p all -s 219.0.0.0/8 -j ACCEPT
iptables -A INPUT -i eth0 -p all -s 118.98.0.0/16 -j ACCEPT
iptables -A INPUT -i eth0 -p all -j DROP
# allow certain inbound ICMP types (ping, traceroute..)
iptables -A INPUT -i eth0 -p icmp --icmp-type destination-unreachable -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type time-exceeded -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -j ACCEPT
#iptables -A INPUT -i eth0 -p icmp --icmp-type 30 -j DROP
# Drop all packets to port 111 except those from localhost
iptables -A INPUT -s ! 127.0.0.0/8 -p tcp --dport 111 -j DROP
# kill off identd quick
iptables -A INPUT -p tcp -i eth0 --dport 113 -j REJECT --reject-with tcp-reset
# ftp
iptables -A INPUT -p tcp -i eth0 --dport 21 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 21 -j ACCEPT
# ssh
iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 22 -j ACCEPT
# www
iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 80 -j ACCEPT
# https
iptables -A INPUT -p tcp -i eth0 --dport 443 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 443 -j ACCEPT
# Don't log route packets coming from routers - too much logging
iptables -A INPUT -p udp -i eth0 --dport 520 -j REJECT
# Don't log smb/windows sharing packets - too much logging
iptables -A INPUT -p tcp -i eth0 --dport 137:139 -j REJECT
iptables -A INPUT -p udp -i eth0 --dport 137:139 -j REJECT
#settingan untuk security
# block xmas scans
iptables -N xmas
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j xmas
iptables -A FORWARD -p tcp --tcp-flags ALL ALL -j xmas
iptables -A xmas -m limit -j LOG --log-level info --log-prefix "-- XMAS-SCAN --> "
iptables -A xmas -j REJECT
# block xmas-psh-packets
iptables -N xmas_psh
iptables -A INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j xmas_psh
iptables -A FORWARD -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j xmas_psh
iptables -A xmas_psh -m limit -j LOG --log-level info --log-prefix "-- XMAS-PSH-SCAN --> "
iptables -A xmas_psh -j REJECT
# block nmap-xmas-packets
iptables -N nmap_xmas
iptables -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j nmap_xmas
iptables -A FORWARD -p tcp --tcp-flags ALL FIN,URG,PSH -j nmap_xmas
iptables -A nmap_xmas -m limit -j LOG --log-level info --log-prefix "-- NMAP-XMAS-SCAN --> "
iptables -A nmap_xmas -j REJECT
# block syn/rst-packets
iptables -N syn_rst
iptables -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j syn_rst
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN,RST -j syn_rst
iptables -A syn_rst -m limit -j LOG --log-level info --log-prefix "-- SYN/RST-SCAN --> "
iptables -A syn_rst -j REJECT
# block syn/fin-packets
iptables -N syn_fin
iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j syn_fin
iptables -A FORWARD -p tcp --tcp-flags SYN,FIN SYN,FIN -j syn_fin
iptables -A syn_fin -m limit -j LOG --log-level info --log-prefix "-- SYN/FIN-SCAN --> "
iptables -A syn_fin -j REJECT
# bluck null-packets
iptables -N null_scan
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j null_scan
iptables -A FORWARD -p tcp --tcp-flags ALL NONE -j null_scan
iptables -A null_scan -m limit -j LOG --log-level info --log-prefix "-- NULL-SCAN --> "
iptables -A null_scan -j REJECT
# spoofed packets: log and drop
iptables -N spoofing
iptables -A FORWARD -i eth0 -s 192.168.0.0/16 -j spoofing
iptables -A FORWARD -i eth0 -s 172.16.0.0/12 -j spoofing
iptables -A FORWARD -i eth0 -s 10.0.0.0/8 -j spoofing
iptables -A spoofing -m limit -j LOG --log-level info --log-prefix "-- SPOOFING --> "
iptables -A spoofing -j REJECT
# icmp handling - ICMP-Pakete werden erlaubt, bis auf type 5 (redirect)
iptables -N icmp_allow
iptables -N icmp_reject
iptables -A INPUT -p icmp --icmp-type ! 5 -j icmp_allow
iptables -A INPUT -i eth1 -p icmp --icmp-type 5 -m limit -j icmp_reject
iptables -A icmp_allow -j ACCEPT
iptables -A icmp_reject -m limit -j LOG --log-prefix "-- ICMP_REJ --> "
iptables -A icmp_reject -j REJECT --reject-with icmp-host-unreachable
# port-scan default blocked
iptables -N port-scan
iptables -A port-scan -m limit --limit 1/s --limit-burst 4 -j RETURN
iptables -A port-scan -i eth0 -j LOG --log-level info --log-prefix 'port-scan'
iptables -A port-scan -j DROP
iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -j port-scan
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -j port-scan
#Tambahan settingan buat router
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 118.98.168.138
################# END ######################
Semua rule tersebut masih terisi dengan IP ROUTER yang saia miliki. Tugas anda tinggal meng-edit ulang sesuai dengan kebutuhan dan IP yang anda miliki.
jika semua sudah anda edit. kita tinggal menjalankan dengan perintah ./iptables (enter)
saia membuat kumpulan rule ini pada PC ROUTER dengan SO LINUX SuSE 10.2 kemudian saia tempatkan file tersebut di direktory /etc/init.d/iptables. jadi jangan lupa untuk masuk terlebih dahulu pada direktory tersebut sebelum menjalankannya.
SELAMAT MENCOBA.
SOURCE : http://packetstormsecurity.org
pada postingan ini saia akan memberi tips agar kita dapat menjalankan iptables dengn mudah.
persiapan yang dibutuhkan juga sangat mudah. cukup dengan menginstal text editor seperti vi, nano, & tex editor lainya. pastinya anda juga harus mengetahui rule dari iptables.
kita memang bisa menjalankan langsung perintah untuk iptables, tapi jika firewall menglami eror maka kita akan membuat ulang perintah-perintah yang telah kita jalankan. untuk mengatasi itu semua, maka kita akan membuat suatu file yang bisa menjalankan beberapa perintah iptables sesuai dengna kebutuhan.
buatlah sebuah file baru dengan nama iptables dengna menggunakan text editor.
kemudian masukan perintah iptables. seperti dibawah ini.
##################### START #######################
#flush tables
iptables -F
#ip forward
echo 1 > /proc/sys/net/ipv4/ip_forward
# DUMP
iptables -N DUMP > /dev/null
iptables -F DUMP
iptables -A DUMP -p tcp -j LOG
iptables -A DUMP -p udp -j LOG
iptables -A DUMP -p tcp -j REJECT --reject-with tcp-reset
iptables -A DUMP -p udp -j REJECT --reject-with icmp-port-unreachable
iptables -A DUMP -j DROP
# Stateful table
iptables -N STATEFUL > /dev/null
iptables -F STATEFUL
iptables -I STATEFUL -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A STATEFUL -m state --state NEW -i ! eth0 -j ACCEPT
iptables -A STATEFUL -j DUMP
# loopback rules
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# drop reserved addresses incoming (these are reserved addresses
# but may change soon
iptables -A INPUT -i eth0 -s 0.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 1.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 2.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 5.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 7.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 10.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 23.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 27.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 31.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 36.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 39.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 41.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 42.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 58.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 59.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 60.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 127.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 169.254.0.0/16 -j DUMP
iptables -A INPUT -i eth0 -s 172.16.0.0/12 -j DUMP
iptables -A INPUT -i eth0 -s 192.168.0.0/16 -j DUMP
iptables -A INPUT -i eth0 -s 197.0.0.0/8 -j DUMP
iptables -A INPUT -i eth0 -s 224.0.0.0/3 -j DUMP
iptables -A INPUT -i eth0 -s 240.0.0.0/8 -j DUMP
#set iptables to allow everything from my work network
iptables -A INPUT -i eth0 -p all -s 202.0.0.0/8 -j ACCEPT
iptables -A INPUT -i eth0 -p all -s 219.0.0.0/8 -j ACCEPT
iptables -A INPUT -i eth0 -p all -s 118.98.0.0/16 -j ACCEPT
iptables -A INPUT -i eth0 -p all -j DROP
# allow certain inbound ICMP types (ping, traceroute..)
iptables -A INPUT -i eth0 -p icmp --icmp-type destination-unreachable -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type time-exceeded -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -j ACCEPT
#iptables -A INPUT -i eth0 -p icmp --icmp-type 30 -j DROP
# Drop all packets to port 111 except those from localhost
iptables -A INPUT -s ! 127.0.0.0/8 -p tcp --dport 111 -j DROP
# kill off identd quick
iptables -A INPUT -p tcp -i eth0 --dport 113 -j REJECT --reject-with tcp-reset
# ftp
iptables -A INPUT -p tcp -i eth0 --dport 21 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 21 -j ACCEPT
# ssh
iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 22 -j ACCEPT
# www
iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 80 -j ACCEPT
# https
iptables -A INPUT -p tcp -i eth0 --dport 443 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --dport 443 -j ACCEPT
# Don't log route packets coming from routers - too much logging
iptables -A INPUT -p udp -i eth0 --dport 520 -j REJECT
# Don't log smb/windows sharing packets - too much logging
iptables -A INPUT -p tcp -i eth0 --dport 137:139 -j REJECT
iptables -A INPUT -p udp -i eth0 --dport 137:139 -j REJECT
#settingan untuk security
# block xmas scans
iptables -N xmas
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j xmas
iptables -A FORWARD -p tcp --tcp-flags ALL ALL -j xmas
iptables -A xmas -m limit -j LOG --log-level info --log-prefix "-- XMAS-SCAN --> "
iptables -A xmas -j REJECT
# block xmas-psh-packets
iptables -N xmas_psh
iptables -A INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j xmas_psh
iptables -A FORWARD -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j xmas_psh
iptables -A xmas_psh -m limit -j LOG --log-level info --log-prefix "-- XMAS-PSH-SCAN --> "
iptables -A xmas_psh -j REJECT
# block nmap-xmas-packets
iptables -N nmap_xmas
iptables -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j nmap_xmas
iptables -A FORWARD -p tcp --tcp-flags ALL FIN,URG,PSH -j nmap_xmas
iptables -A nmap_xmas -m limit -j LOG --log-level info --log-prefix "-- NMAP-XMAS-SCAN --> "
iptables -A nmap_xmas -j REJECT
# block syn/rst-packets
iptables -N syn_rst
iptables -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j syn_rst
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN,RST -j syn_rst
iptables -A syn_rst -m limit -j LOG --log-level info --log-prefix "-- SYN/RST-SCAN --> "
iptables -A syn_rst -j REJECT
# block syn/fin-packets
iptables -N syn_fin
iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j syn_fin
iptables -A FORWARD -p tcp --tcp-flags SYN,FIN SYN,FIN -j syn_fin
iptables -A syn_fin -m limit -j LOG --log-level info --log-prefix "-- SYN/FIN-SCAN --> "
iptables -A syn_fin -j REJECT
# bluck null-packets
iptables -N null_scan
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j null_scan
iptables -A FORWARD -p tcp --tcp-flags ALL NONE -j null_scan
iptables -A null_scan -m limit -j LOG --log-level info --log-prefix "-- NULL-SCAN --> "
iptables -A null_scan -j REJECT
# spoofed packets: log and drop
iptables -N spoofing
iptables -A FORWARD -i eth0 -s 192.168.0.0/16 -j spoofing
iptables -A FORWARD -i eth0 -s 172.16.0.0/12 -j spoofing
iptables -A FORWARD -i eth0 -s 10.0.0.0/8 -j spoofing
iptables -A spoofing -m limit -j LOG --log-level info --log-prefix "-- SPOOFING --> "
iptables -A spoofing -j REJECT
# icmp handling - ICMP-Pakete werden erlaubt, bis auf type 5 (redirect)
iptables -N icmp_allow
iptables -N icmp_reject
iptables -A INPUT -p icmp --icmp-type ! 5 -j icmp_allow
iptables -A INPUT -i eth1 -p icmp --icmp-type 5 -m limit -j icmp_reject
iptables -A icmp_allow -j ACCEPT
iptables -A icmp_reject -m limit -j LOG --log-prefix "-- ICMP_REJ --> "
iptables -A icmp_reject -j REJECT --reject-with icmp-host-unreachable
# port-scan default blocked
iptables -N port-scan
iptables -A port-scan -m limit --limit 1/s --limit-burst 4 -j RETURN
iptables -A port-scan -i eth0 -j LOG --log-level info --log-prefix 'port-scan'
iptables -A port-scan -j DROP
iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -j port-scan
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -j port-scan
#Tambahan settingan buat router
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 118.98.168.138
################# END ######################
Semua rule tersebut masih terisi dengan IP ROUTER yang saia miliki. Tugas anda tinggal meng-edit ulang sesuai dengan kebutuhan dan IP yang anda miliki.
jika semua sudah anda edit. kita tinggal menjalankan dengan perintah ./iptables (enter)
saia membuat kumpulan rule ini pada PC ROUTER dengan SO LINUX SuSE 10.2 kemudian saia tempatkan file tersebut di direktory /etc/init.d/iptables. jadi jangan lupa untuk masuk terlebih dahulu pada direktory tersebut sebelum menjalankannya.
SELAMAT MENCOBA.
SOURCE : http://packetstormsecurity.org
Minggu, 2008 Maret 23
free account rapidshare

rapidshare sapa seh yang ngga tau :D. hehehe.. disinilah server upload No.1 di dunia. tapi di server ini tidak terlalu sempurna. karena untuk mengakses kesitus ini dengan atau tanpa hambatan, kita harus memiliki account. Gimana klo kita ngga punya account?
Jika kita hendak mendownload file yang berkapasitas 1M maka untuk mendownload file yang lain dari server rapid tersebut maka kita haru menunggu sekian waktu untuk dapat mendownload dari ulang server tersebut.
tapi sekarang ngga usah risau atau kesel. karena saia punya solusi yang bisa memuaskan. tanpa harus membeli account dengan paypal. tinggal paste URL / Link tersebut. gimana caranya.. ?
pertama itu yang pasti anda harus memiliki Bandwith yang cukup besar. agar anda puas dengan kecepatan transfer.
http://vzin.net/rapid/ <<>
ada beberapa link yang tersedia sesuai dengan aturan waktu tertentu. jika link 1 tidak active maka coba link yang lain
http://rapidshare.vzin.net/rs1/ <1-6>
http://rapidshare.vzin.net/rs2/
http://rapidshare.vzin.net/rs3/
http://rapidshare.vzin.net/rs4/
dengan ke 4 link tersebut anda bisa mendownload file dari rapidshare dengan puas.
terimakasih saya ucapkan kepada admin vzin.net hehehe..
selamat mencoba ^_^

