Install Unbound Dns on Centos

First make repo

nano /etc/yum.repos.d/centalt.repo
[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0
yum install unbound bind-utils -y
cd /etc/unbound
wget  ftp://FTP.INTERNIC.NET/domain/named.cache
unbound-control-setup
chown unbound:root unbound_*
chmod 440 unbound_*
nano /etc/unbound/unbound.conf


Make Startup Script on CentOS

Sebenarnya membuat script startup bisa dengan mengedit file rc.local yang ada pada /etc/rc.d/
Namun ane lebih suka dengan menggunakan script, jadi sita bisa menggunakan command “service namaprogram start / stop / restart..

Dan semua jenis program bisa dijalankan lewat script iniLangsung aja ya..

1. Buat file baru yang bernamakan “NamaService” (boleh diganti sesuai dengan program yang ingin kalian buat) yang isinya sebagai berikut.



Port Forwarding Mikrotik Using DMZ or PPPoE

if dial-in modem (you must download the DMZ interface Mikrotik)
use in-physical interface leading to the modem

modem = 192.168.1.1 (DMZ to 192.168.1.2)
ether1(modem) = 192.168.1.2
local webserver = 10.0.0.1/24

example DMZ

#port forwarding to local ssh
/ip firewall nat add chain=dstnat in-interface=ether1 dst-address=192.168.1.2 protocol=tcp dst-port=22 action=dst-nat to-address=10.0.0.1 to-port=22



Redirect to www & vise versa (htaccess)

Edit your .htaccess place this code after RewriteEngine On
This lines makes redirection to www

# Redirect if NOT www.example.com (exactly) to www.example.com
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

or

# Redirect if example.com (case-insensitive) to www.example.com
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

Use non-www redirect

Show hidden files in cPanel file manager

When you click on File Manager, do you get a popup box asking where do you want to go to? (NOT THE FILE MANAGER ITSELF!)

If yes:

Check the box "Show Hidden Files", and then continue normally.

If no: