semoga bisa membantu rekanx2 yang bingung ipchains masq, ini hanya petunjuk
praktis
yang saya buat, kalo ada yang salah kurang silahkan protes, he he he :) demi
kemajuan kita
bersama.
SERVER WARNET LINUX - MINI HOWTO (v.1.0.1)
waxx ([EMAIL PROTECTED], [EMAIL PROTECTED])
server Dalnet, #indolinux #indofreebsd #lombok_ijo
minihowto ini dibuat dengan asumsi anda udah bisa melakukan instalasi
linux (RH 6.2) scr standar. Hanya saja untuk kemudahan konfigurasi
maka ada beberapa hal disebutkan pd waktu instalasi.
partisi pada dasarnya hanya butuh 3 buah "/", "/boot", "/swap"
pada waktu pemilihan partition dengan diskdruid pilihan /boot dapat
set pada 5 mb tidak usah 16mb
pada option network,
disable option DHCP
active-kan lan card saat booting
ip address : 192.168.0.1
netmask : 255.255.255.0
====================================================================
tolong yang bener yang mana ? di isi apa kosong ?
====================================================================
network : kosongkan atau 192.168.0.254
broadcast : kosongkan atau 192.168.0.255
hostname: kosongkan atau pegellinux.net
gateway : kosongkan atau 192.168.0.1
PrimaryDNS : kosongkan atau 202.155.0.10
untuk pemilihan packet sebaiknya pilih custom, dengan memilih yang
penting secara manual (menghemat hdd brp puluh s/d ratusan mb)
yang biasanya di ambil adalah (pake RH 6.2):
dns server, development, networking workstation, xwindow
gnome/kde (pilih salah satu)
atau kalau mau agak susah, klik select individual packages
(lebih hemat lagi, banyak paket yang bisa dihilang ex; ghostscript,
ghostview untuk fasilitas print, publising, game, multimed dll)
setelah instalasi selesai ikuti petunjuk dibawah ini, cek dan edit
sesuaikan dengan kebutuhan dan kondisi yang ada
=====================================================================
setting network & firewall & tcpwrappers & forward & Masq
exam : isp indosat (202.155.0.10 dan 202.155.0.15)
ip address serper warnet 192.168.0.1
=====================================================================
1. memberikan batasan untuk jaringan dari external masuk ke sistem
pada /etc/host.deny
ALL:ALL
2. memberikan ijin kepada internal network untuk keluar
pada /etc/host.allow
ALL:127.0.0.1
ALL:192.168.0.0/255.255.255.0 #atau 192.168.0.
3. pada /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv4.ip.conf.all=1
kernel.sysrg =0
net.ipv4.ip_always.defrag=0
4. pada /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=yes
5. buat script(file) firewall di ( /etc/rc.d/)
# touch firewall
# chmod 755 firewall
# chown nobody.root firewall
edit script firewall pake vi, pico, mc, ect terserah yang penting
mengerti cara pakainya. isikan berikut ini
/sbin/ipchains -F input
/sbin/ipchains -F output
/sbin/ipchains -F forward
/sbin/modprobe ip_masq_autofw
/sbin/modprobe ip_masq_ftp
/sbin/modprobe ip_masq_irc
ports=6660,6661,6662,6663,6664,6665,6666,6667,6668,6669,6670
/sbin/modprobe ip_masq_mfw
/sbin/modprobe ip_masq_cuseeme
/sbin/modprobe ip_masq_portfw
/sbin/modprobe ip_masq_quake
/sbin/modprobe ip_masq_user�
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter
ipchains -P forward DENY
ipchains -A forward -s 192.168.0.0/24 -j MASQ
letakkan/sisipkan script firewall pada /etc/rc.d/rc.local
untuk yang lebih secure dapat mengutak-atik file inetd.conf, servives dll
hidupkan ipchains sebagai daemon pada # setup
=====================================================================
setting modem
bila merencanakan setting dial lewat xdm maka hanya no.6 diperhatikan
bila tidak(lewat ppp script) maka buka saja http://linux.or.id untuk
informasi lebih lengkap :) .
=====================================================================
6. pada /etc/ppp/option
-detach
modem
lock
crtscts # use hardware flow
defaultroute # set route
asyncmap 0
mtu 522 # setting max trans unit
mru 522 # setting max recv unit
name indosat.net.id
=====================================================================
setting squid (asfik ?)
=====================================================================
7. pada /etc/squid/squid.conf
keterangan lebih jls tiap option dibwh dpt di baca pada squid.conf
http_port 8080
icp_port 0
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY #Avoid caching cgi scripts
cache_mem 24 MB #tergantung jumlah memory
tips 1/3 mem total
cache_swap_low 90
cache_swap_high 95
debug_options ALL,1 #Establish minimum debug
level
maximum_object_size 4096 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
redirect_rewrites_host_header off
cache_dir ufs /scache 512 16 256
cache_access_log /scache/access.log
cache_log /scache/cache.log
cache_store_log /scache/store.log
emulate_httpd_log on
pid_filename /var/run/squid.pid
client_netmask 255.255.255.0
cache_dns_program /usr/lib/squid/dnsserver
dns_children 20
dns_nameservers 192.168.0.1
redirect_children 10
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
replacement_policy GSDF
reference_age 2 week
quick_abort_min 16 KB #Allow server to abort if
requesting aborts
quick_abort_max 16 KB
quick_abort_pct 95 #But continue if less than 16
KB left or 95+% done
negative_ttl 5 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 5 minutes
connect_timeout 120 seconds
peer_connect_timeout 30 seconds
read_timeout 15 minutes
request_timeout 30 seconds
client_lifetime 1 day
half_closed_clients on
pconn_timeout 120 seconds
ident_timeout 10 seconds
shutdown_lifetime 30 seconds
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl pegelnet src 192.168.0.0/255.255.255.0
acl SSL_ports port 443 563
acl Safe_ports port 21 70 80 98 210 443 563 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow manager
http_access allow pegelnet
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
icp_access allow all
miss_access allow all
cache_mgr [EMAIL PROTECTED]
cache_effective_user squid
cache_effective_group squid
announce_period 1 day
httpd_accel_with_proxy on
httpd_accel_uses_host_header off
logfile_rotate 10
query_icmp off
buffered_logs off
cachemgr_passwd my-secret-pass all
8. setelah selesai edit squid.conf
set dan aktifkan direktory cache # squid -z
aktifkan squid # squid start
dan hidupkan squid sebagai daemon pada # setup
=====================================================================
setting dns server [named]
terus terang masih bingung, (sleepless pls :) mohon dilengkapi
=====================================================================
9. pada /etc/resolv.conf
domain pegellinux.net
search indosat.net.id
nameserver 202.155.0.10
nameserver 202.155.0.15
10. pada /etc/host.conf
order hosts, bind
multi on
11. cek dengan nslookup
# nslookup www.altavista.com 192.169.0.1
bila tidak ada pesan error maka dns server udah jalan
dan hidupkan sbg daemon pada #setup
=====================================================================
scr teori setting di atas sudah bisa berjalan, untuk lebih optimalnya
bisa terusx2 utak atik linux-nya :)
=====================================================================
SUMBER :
Home-Network-mini-HOWTO
SQUID Frequently Asked Questions DOC
ISP Planet Cache Review Series - Squid 2.3
buku SERVER LINUX KPLI Jakarta
terimakasih juga untuk narasumber (para op indolinux) dibawah :)
rootkz [EMAIL PROTECTED]
Antoro ?
Asfik [EMAIL PROTECTED]
Jamal [EMAIL PROTECTED]
[X]YAN ?
Udie [EMAIL PROTECTED]
gembel'gondrong [EMAIL PROTECTED]
sleepless [EMAIL PROTECTED]
(nama diurutkan berdasarkan wkt dulu bertanya)
baru masup kudu nambah komentar :)
buat rekan-rekan linuxers terus terang saja mini howto ini masih sangat
jauh dari sempurna, bila ada yang ingin membagi ilmu dan kontribusinya
dapat mengirimkan e-mail ke [EMAIL PROTECTED]
--------------------------------------------------------------------------
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Dapatkan FAQ milis dg mengirim email kosong ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3
Pengelola dapat dihubungi lewat [EMAIL PROTECTED]