Friday, September 19, 2014

Install squid33 in FreeBSD 9.2

  1. Add package squid33
  2. pkg_add -r squid33
  3. Masuk ke directory squid
  4. cd /usr/ports/www/squid33 
  5. Compile and choose some option that fit with your requirement
  6. make install clean
  7. You can edit your squid configuration in /usr/local/etc/squid/squid.conf
  8. Make squid cache
  9. squid -z
  10. Insert squid to system boot. Open /etc/rc.conf and add squid_enable="YES"
  11. Start your squid
  12. service squid start

Source:
http://wiki.squid-cache.org/KnowledgeBase/FreeBSD

Force Using https Instead of http Ubuntu 14.04

The main idea for this forcing is redirect your http://yourdomain.com to https://yourdomain.com. This tutorial use apache web server. To do this, follow this step:
  1. Open your web server configuration
  2. nano /etc/apache2/sites-available/000-default.conf
  3. Add this line before </VirtualHost>
  4. Redirect permanent / https://yourdomain.com
  5. Save and restart your apache
  6. service apache2 restart

Sumber:
https://wiki.apache.org/httpd/RedirectSSL

Install Comodo SSL Ke Apache Ubuntu 14.04

Sekilas tentang SSL
Istilah gampangnya adalah SSL memungkinkan kita untuk mengubah akses ke website dari http menjadi https. Keungguan https adalah adanya enkripsi dari komputer kita ke web server. Kalo mengirim password tanpa https, maka password akan dapat dengan mudah dibaca, sedangkan kalo pake https, maka semua data yang dikirim ataupun yang diterima akan di enkripsi, sehingga tidak mudah untuk disadap. Untuk tutorial kali ini, apache web server harus sudah terinstall dan IP yang digunakan adalah IP global yang static.

Hal yang perlu dilakukan untuk memasang ComodoSSL adalah sebagai berikut:

Friday, August 22, 2014

Enable Root Login Over SSH in FreeBSD 10.0

By default, we cannot login to FreeBSD over ssh. So, we must enable it from openSSH configuration.

Open /etc/ssh/sshd_config with your 'ee' text editor
ee /etc/ssh/sshd_config
Find this
#PermitRootLogin no
Change to
PermitRootLogin yes
Press escape, and then choose yes for save confirmation.

Finally, restart your ssh daemon
 service sshd restart
 ...and done. You can login with root remotely over ssh.

Source:
http://blog.bobbyallen.me/2011/07/22/how-to-enable-root-login-over-ssh-on-freebsd-8-2/

Thursday, August 7, 2014

Installing Flash Player Ubuntu In Single Step

Close all running Firefox

Open your terminal

Type "sudo apt-get install flashplugin-nonfree"

Now flash player should be working.

Source:
http://www.cyberciti.biz/faq/ubuntu-linux-how-to-install-flash-player-for-firefox/

Thursday, July 17, 2014

Deleting Single Iptables Rule

I look at my iptables rules
iptables -L
and get this
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere           

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

For example I make rule to accept port 80, so I do this
iptables -I INPUT 3 -p tcp --dport 80 -j ACCEPT
and then iptables -L give us this
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere           
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
ACCEPT     all  --  anywhere             anywhere
Look at third line, there is rule for accepting connection from port 80. The rule inserted in third line because I use 3 in this rule
 iptables -I INPUT 3 -p tcp --dport 80 -j ACCEPT
If we want to delete this single rule, do
iptables -D INPUT 3
So iptables -L give us
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere
Source:
http://major.io/2007/02/09/delete-single-iptables-rules/

Upgrade Ubuntu 12.04 to Ubuntu 14.04

Ensure that your Ubuntu is up to date
sudo apt-get update && sudo apt-get upgrade -y
Install update manager core
sudo apt-get install update-manager-core -y
 Upgrade your Ubuntu
sudo do-release-upgrade -d
And follow next instruction carefully.....

Source:
http://www.namhuy.net/2853/upgrade-ubuntu-12-04-lts-ubuntu-14-04-lts.html