SETTING DNS, WEB SERVER ,SQUID , FTP DI UBUNTU SERVER

Posted by Unknown Rabu, 13 Maret 2013 1 komentar


1.KONEKSI INTERNET
langkah langkahnya
$ nano /etc/network/interface
auto  lo iface lo net loopback
#untuk ubuntu server
iface eth0 inet static
address 192.168.3.112
netmask 255.255.255.0
gateway 192.168.3.1
network 192.168.3.0
dns_nameservers 192.168.3.1 124.81.119.50
#untuk client
auto eth1
address 192.168.50.1
netmask 255.255.255.0
gateway 192.168.50.1

#bila ip lebih dari 1 maka perlu ditambahkan
iface eth1:0
iface eth1:0 inet static
address 202.100.4.65
netmask 255.255.255.0

kemudian save ctrl-x
lalu restart
/etc/init.d/networking restart


2. SETTING ICS
masuk terminal
cd /proc/sys/net/ipv4
$ nano ip_forward
$ nano /etc/sysctl.conf
$ nano iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
$ nano /etc/rc/local
pada tulisan dibawah exit di tulis
# sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
kemudian save ctrl-x
lalu restart
$ nano /etc/init.d/networking restart

3. SETTING DNS
masuk terminal
sudo apt-get install bind9
$ nano /etc/bind/named.conf – options
tambahkan forwaders 192.168.3.1 ; ( ip dns server )
192.168.3.112 ;
$ nano /etc/bind/named.conf.local
zone “smk3.sch.id”{
type master;
file ” /etc/bind/db.smk3.sch.id”;
};
zone”www.profilku.com”{
type master;
file ” /etc/bind/db.www.profilku.com
};
zone”50.168.192. in-addr.arpa”{
type master;
file ” /etc/bind/db.192″;
};
langkah berikutnya
 cd  /etc/bind# cp.db.local db.smk3.sch.id ,  cp.db.profilku.com
db.local db.smk3.sch.id di bawah ini:
-IN SOA ns.smk3.sch.id  root.smk3.sch.id
@ IN NS          ns.smk3.sch.id
@ IN  A           192.168.50.1
@ IN  AAAA   :: 1
@ IN A             192.168.50.1
@ www             192.168.50.1
db.profilku.com dibawah ini
file
-IN SOA ns.www.profilku.com root.www.profilku.com
@ IN NS         ns.www.profilku.com
@ IN A            127.0.0.1
@ IN  AAA      ::1
@ NS IN  A     10.0.0.2
@ www IN      CNAME  ns.
cd  /etc/bind# cp db.127 db.192
ketik db.192
-IN SOA  ns.smk3.sch.id  root.smk3.sch.id
@ IN NS  ns
@ 1.0.0  IN PTR  ns.smk3.sch.id
@ IN PTR  www.profilku.com
$ nano /etc/resolv.conf
nameserver 192.168.3.112
nameserver 10.10.10.1
restart bind9
$ nano /etc/init.d/bind9 restart
4. SETTING SQUID
$ sudo apt get install squid.conf
$ sudo nano /etc/squid.conf
tuliskan dibaris paling bawah
-acl blokir dstdomain “/etc/squid/blokir.txt”
http_access deny blokir
_acl kunci url_regex -i “/etc/squid/kunci.txt”
http_access deny kunci
_acl jaringan SRC 192.168.50.0/24
http_access allow jaringan
cache_mgr pitriaoktaa@yahoo.co.id
cache_swap_low 98
cache_swap_high 99
kemudian ctrl-x -> y
#membuat folder blokir txt
$ sudo /etc /squid# nano blokir.txt
www.profilku.com
profilku.com
#membuat folder kunci
$ sudo /etc/squid# nano kunci.txt
www.profilku.com
profilku.com
kemudian untuk mengecek berhasil atau tidaknya
ketik : squid -k reconfigure
# masuk ke folder nano /etc/rc.local
isikan perintah :
iptables -t nat -A POSTROUTING 192.168.50.0/24 -p tcp -dport  80 -j REDIRECT -to-ports 3128
#kemudian  iptables di folder squid
iptables -t nat -A POSTROUTING -s  192.168.50.0/24 -p tcp -dport 80 -j REDIRECT -to-ports 3128
#kemudian restart
/etc/init.d/squid restart
5. SETTING WEB SERVER
# Add user = smk3.sch.id
# id /home/smk3.sch.id
# mkdir public_html
# cd  /home/smk3.sch.id /public_html
# nano index.html
# mkdir logs
# apt-get install apache2
lalu ke alamat http: // localhost/
jika berhasil akan muncul : it works !
# sudo  /etc/init.d/apache2 start
# sudo  /etc/init.d/apache stop
# sudo  /etc/init.d/restart
# sudo apt-get install myqsl_server
user : root
pasword : root
# sudo apt-get install phpmyadmin
# sudo cp  /etc/phpmyadmin/apache2.conf /etc/apache2 /conf.d
# sudo /etc/init.d /apache2 restart
ke alamat : http : // localhost /phpmyadmin
masukan user : root
pasword : root
# sudo apt-get install php5 libapache2-mod-php5
# sudo /etc/init.d/apache2 restart
untuk mncoba anda bisa membuat skrip php pada directory /var/www anda bisa membuat php info.php
# sudo gedit / var/www/php info.php
<? php
phpinfo };
?>
lalu save ctrl-x -> y
# ke web browser http : // localhost/phpinfo.php
6. SETTING FTP
# apt-get install proftpd –> pilih stand lon
# cd  /etc/proftpd –> ls
# nano proftpd.conf –> on –> diganti off ( sett of)
servername diganti smk3
# adduser fitri
pasword : tkjfitri
# service proftpd restart


Baca Selengkapnya ....

Pages

Modified by info update - Panduan Blogging SEO. Original by Bamz | Copyright of MaiL CrowzeR.