Install OpenBSD
Install OpenBSD
Install OpenBSD
*wink at om
luckky_man*. Ini saya uji coba pada tahun lalu dan direvive lagi setelah ada yg
bertanya kemaren saat chattang-chatting di IRC. Klo saya banding-bandingin dikid
dengan OS fav. saya Fedora Core 4 OpenBSD jauh lebih kencang, namun kenapa OpenBSD
gak jadi favorites saya ? Pernah trauma dengan masalah mati lampu eh OBSD na
langsung panik ! kqkqkq.. apa mo dikata... gak pake UPS yah gini deh... but saya
terpesona dengan BSD yg satu ini. anh berikut tutorial kecil dari saya:
langkah pertama, masukan cd openbsd 3.7 yg sudah dibuat tadi, terus booting
komputer
This program will help you install OpenBSD in a simple and rational way. At
any prompt except password prompts you can run a shell command by typing
'!foo', or escape to a shell by typing '!'. Default answers are shown in []'s
and are selected by pressing RETURN. At any time you can exit this program by
pressing Control-C and then RETURN, but quitting during an install can leave
your system in an inconsistent state.
IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this
program can cause SIGNIFICANT data loss.
It is often helpful to have the installation notes handy. For complex disk
configurations, relevant disk hardware manuals and a calculator are useful.
You will now initialize the disk(s) that OpenBSD will use. To enable all
available security features you should configure the disk(s) to allow the
creation of separate filesystems for /, /tmp, /var, /usr, and /home.
Do you want to use *all* of wd0 for OpenBSD? [no] Yes (sembarang boleh N0 or YES)
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: WDC WD273BA
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 53464320
free sectors: 0
rpm: 3600
4 partitions:
# size offset fstype [fsize bsize cpg]
a: 80.2M 0.0M 4.2BSD 2048 16384 162
b: 300.2M 80.2M swap
c: 26105.6M 0.0M unused 0 0
d: 80.2M 380.5M 4.2BSD 2048 16384 164
> a b
offset: [1310400]
size: 512 M ---> contoh 512 mb
FS type: [swap]
> a d
offset: [3991680] Enter
size: 18 G --> misalkan 18 Gb
Rounding to nearest cylinder: 245952
FS type: [4.2BSD] Enter
mount point: [none] /cache ---> sembarang boleh /var , /usr , dll lah
> p m
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: ST320011A
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 39102336
free sectors: 22115520
4 partitions:
# size offset fstype [fsize bsize cpg]
a: 2 G 1498.7M 4.2BSD 2048 16384 16 # /
b: 512 M 1648.8M swap
c: 19092.9M 0.0M unused 0 0
d: 17 G 1949.1M 4.2BSD 2048 16384 16 # /cache
> q
Write new label?: [y] Enter
OpenBSD filesystems:
wd0a /
wd0b /swap
wd0d /cache
You will now specify the location and names of the install sets you want to
load. You will be able to repeat this step until all of your sets have been
successfully loaded. If you are not sure what sets to install, refer to the
installation notes for details on the contents of each.
[X] bsd
[X] bsd.rd
[X ] bsd.mp
[X] base37.tgz
[X] etc37.tgz
[X] misc37.tgz
[X] comp37.tgz
[X] man37.tgz
[] game37.tgz
[ ] xbase37.tgz
[ ] xetc37.tgz
[ ] xshare37.tgz
[ ] xfont37.tgz
[ ] xserv37.tgz
Finishing up
sudah
sampe disini sudah jadi
bila masih kebingungan bisa melihat manual lagi
http://www.openbsd.org/faq/faq4.html
http://www.wbglinks.net/pages/openbsd/installation.html
[root@luckyy_man]# pkg_add -v
ftp://ftp.kd85.com/pub/OpenBSD/3.7/packages/i386/bash-3.0.16p0.tgz
setelah selesai
[root@luckyy_man]# chsh
Shell: /usr/local/bin/bash
supaya keren
[root@luckyy_man]# vi .bash_profile
PS1="[u@h W]$ "
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ll='ls -l'
kemudian reboot
selanjutnya
[root@luckyy_man]# cd /etc/
[root@luckyy_man etc]# ls | grep hostname
hostname.rl0
hostname.rl1
vi /etc/pf.conf
#scrub in
nat on $ext_if from $int_if="rl1":network to any -> ($ext_if)
[root@luckyy_man]# vi /etc/rc.conf.local
sendmail_flags=NO
pf=YES
check_quotas=NO
ntpd=NO
named_flags=""
kemudian reboot
nah openbsd anda sudah bisa jadi router :D
yg pasti harus download squid nya dulu :D (pake yg tar.gz aja biar gak repot)
utk lebih baik nya baca http://www.benzedrine.cx/transquid.html
Cek dgn
[root@luckyy_man]# vipw
----------------------------------
nobody:*:32767:32767::0:0:Unprivileged user:/nonexistent:/sbin/nologin
user1:$2a$06$qaJOhO42.xicTJOIEygmPeMV//QWvE7bZJJLWtRBbxKctubbt2Iga:1000:1000:
:0:0:user1:/home/user1:/bin/sh
-----------------------------------
Belum ada user squid --> sip kl gitu bisa lanjut
kl sudah ada di remove dulu
[root@luckyy_man]# cd /usr/local/src/squid-2.5.STABLE11
[root@luckyy_man]# ./configure --sysconfdir=/etc/squid
--enable-pf-transparent --enable-snmp --enable-ssl
--enable-removal-policies=lru,heap
--enable-default-languages=English
--enable-err-languages=English --enable-delay-pools
--enable--cache-digests --enable-poll
--disable-ident-lookups --disable-hostname-checks
--enable-storeio=diskd,ufs
[root@luckyy_man]# /usr/local/squid/sbin/squid -z
tambahkan di /etc/rc.local
[root@luckyy_man]# vi /etc/rc.local
if [ -x /usr/local/squid/sbin/squid ]; then
echo -n 'squid'; /usr/local/squid/sbin/squid -D
fi
Jalankan dengan
Cek dengan
[root@luckyy_man]# tail -f /var/log/messages
rdr on $int_if proto tcp from any to any port 80 -> 192.168.0.1 port 3128
Kemudian save
terus
[root@luckyy_man]# pfctl -f /etc/pf.conf
[root@luckyy_man]# pfctl -sn
nat on rl0 inet from 192.168.0.0/24 to any -> (rl0) round-robin
rdr on rl1 inet proto tcp from any to any port = www -> 192.168.0.1 port 3128
Firewall ini sederhana, cuman menutup port-port default yg terbuka (kl buka terus
nanti masuk angin) supaya tidak mudah untuk disusupi
[root@luckyy_man]# vi /etc/pf_firewall.conf
# options
set block-policy return
set loginterface $ext_if
# scrub
scrub in all
# nat/rdr
nat on $ext_if from 192.168.1.0/24 to any -> ($ext_if)
nat on $ext_if from 192.168.0.0/24 to any -> ($ext_if)
rdr on $int_if proto tcp from any to any port 80 -> 192.168.1.1 port 3128
# filter rules
block all # Menutup semua port
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state
ini firewall sederhana, akan meng close semua port termasuk port 80, saat ini
belum tau caranya buka port http :D (soalnya gak pake web server) mungkin ada
teman2 yg bisa bantu ??
Spesial Thnks to Bos JALI & Bos Soegemblung yg telah membantu dan mau direpoti
agar SNMP bisa terbaca ISP
Hidup Bos JALI & Bos GEMBLUNG
Tambahkan
[root@luckyy_man]# vi /etc/sysctl.conf
net.inet.ip.forwarding=1 # 1=Permit forwarding (routing) of packets
kern.maxfiles=8192
kern.maxclusters=16384
[root@luckyy_man]# ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) 1048576
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 147026
max memory size (kbytes, -m) 439668
open files (-n) 128 --> ini yg di perbesar
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 532
virtual memory (kbytes, -v) 1056768
daemon:
:ignorenologin:
:datasize=infinity:
:maxproc=infinity:
:openfiles-cur=1024: --> di edit juga
:stacksize-cur=8M:
:localcipher=blowfish,8:
:tc=default:
---------------------------------------
[root@luckyy_man]# ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) 1048576
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 147026
max memory size (kbytes, -m) 439668
open files (-n) 1024 ---> sudah berubah
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 532
virtual memory (kbytes, -v) 1056768
kemudian
[root@luckyy_man]# tar zxfv src.tar.gz -C /usr/src
sambil menunggu proses chating di #indoopenbsd (agak lama ekstraknya)
terus
[root@luckyy_man]# cd /usr/src/sys/arch/i386/conf/
[root@luckyy_man]# vi GENERIC --> (bukan obat GENERIC :D)
--------tambahkan-------------
option MSGMNB=16384
option MSGMNI=40
option MSGSEG=2048
option MSGSSZ=64
option MSGTQL=1024
------------------------------
GANTi KERNEL
[root@luckyy_man]# cd /usr/src/sys/arch/i386/compile/GENERIC/
[root@luckyy_man]# cp /bsd /bsd.old
[root@luckyy_man]# cp bsd /bsd ---> ketik yes
[root@luckyy_man]# reboot
abis booting
[root@luckyy_man]# uname -a
OpenBSD luckyy_man.com 3.7 GENERIC#0 i386
SUDAH JADI :D
Edit :
vi /etc/sysctl.conf
net.inet.ip.forwarding=1
vi /etc/pf.conf
eth0 = "fxp0"
eth1 = "fxp1"
vi /etc/rc.conf.local
sendmail_flags=NO
pf=YES
check_quotas=NO
ntpd=NO
named_flags=""
Do command :
nat on $eth0 from $eth1 to any -> ($eth0)
http://www.wbglinks.net/pages/openbsd/cvsup.html
http://www.0xdeadbeef.info/conf/pf.conf.35