Rabu, 25 Juni 2014

Blok akses https Facebook di Mikrotik

tambahkan regex
/ip firewall layer7-protocol add name=blok regexp=facebook.com

tambahkan ip pengecualian yang dibolehkan akses facebook untuk percobaan
/ip firewall address-list add list=exeptions address=192.168.1.80

buat paketnya di mangle, taruh paket paling atas
/ip firewall mangle add chain=prerouting layer7-protocol=blok action=mark-packet new-packet-mark=blok passthrough=no

setelah itu bikin filternya untuk jump ke chain baru
/ip firewall filter add chain=forward packet-mark=blok action=jump jump-target=blok

setelah itu drop paket di chain yang baru
/ip firewall filter add chain=blok packet-mark=blok src-address-list=!exeption dst-address-list=!exeption action=drop


Source : (http://remukcorp.blogspot.com)

Port Forwarding in CentOS Using Iptables

check if IP forwarding is enabled:

/sbin/sysctl net.ipv4.ip_forward
if return
net.ipv4.ip_forward = 1
then it is enabled. if not edit /etc/sysctl.conf and set net.ipv4.ip_forward = 1
rerun
/sbin/sysctl -p /etc/sysctl.conf
/sbin/service iptables restart

Adding IP forwarding rules to IpTables
/sbin/iptables -I FORWARD 1 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -I FORWARD 1 -p tcp --dport 80 -j ACCEPT
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.0.1.1:8080
/sbin/iptables -t nat -A POSTROUTING -j MASQUERADE
/sbin/service iptables save
/sbin/service iptables restart
 
The content of /etc/sysconfig/iptables files looks like:

# Generated by iptables-save v1.3.5 on Fri Mar  8 10:27:21 2013
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.0.1.1:8080
-A POSTROUTING -j MASQUERADE
COMMIT
# Completed on Fri Mar  8 10:27:21 2013
# Generated by iptables-save v1.3.5 on Fri Mar  8 10:27:21 2013
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [234:26336]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8082 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 50010 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 50030 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 50060 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 50070 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 54310 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 50075 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
 
 
 
Source : http://b2ctran.wordpress.com
 

Selasa, 18 Maret 2014

Install dan Setting Squid Proxy di CentOS 5

Tutorial cara install dan setting squid proxy server (2.6 STABLE) di CentOS 5 32-bit VPS

Tutorial cara install dan setting squid proxy server (2.6 STABLE) di CentOS 5 32-bit VPS
  1. Install squid via yum:
    yum install squid
    Cara Install dan setting Squid Proxy di CentOS 5 VPS 1
  2. Edit setingan squid.conf pada squid 2.6 STABLE yang sudah diinstall tadi
    nano /etc/squid/squid.conf
    tambahkan konfigurasi berikut ini, copy paste/ letakkan paling atas di squid.conf tersebut
    #add define hostname
    visible_hostname jadoel.info
    # add auth_params
    auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
    auth_param basic children 2
    auth_param basic realm My Proxy Server
    auth_param basic credentialsttl 24 hours
    auth_param basic casesensitive off
    # add acl rules
    acl users proxy_auth REQUIRED
    # http access rules
    http_access deny !users
    http_access allow users
    #hide IP
    forwarded_for off
    Edit bagian jadoel.info pada’visible_hostname’ sesua selera
    Kurang lebih seperti ini
    Cara Install dan setting Squid Proxy di CentOS 5 VPS 2
    Jika ingin mengubah port squid edit sesuai selera pada bagian http_port 3128 ( default port squid 3128 )
    simpan squid.conf
  3. Menambahkan username dan password untuk squid proxy
    touch /etc/squid/passwd
    chown root.squid /etc/squid/passwd
    chmod 640 /etc/squid/passwd
    Membuat username dan password
    htpasswd /etc/squid/passwd jadoel.info
    Ubah username yang dicetak merah ( jadoel.info) sesuai selera
    Kemudian isi password sesuai selera
    Cara Install dan setting Squid Proxy di CentOS 5 VPS 3
    Jika memakai htpasswd tidak bisa, seperti hasil dibawah ini:
    -bash: htpasswd: command not found
    Solusinya bisa menggunakan 2 cara sebagai berikut:
    • Pertama install httpd-devel via yum
      yum install httpd-devel
      kemudian ulangi langkah membuat user pass diatas
    • Kedua generate htpasswd memakai Perl or Ruby code tanpa harus menginstall apache dan anak buahnya
      perl -le ‘print crypt(“password_anda“, “salt”)’
      Ubah password_anda sesuai selera
      kemudian hasilnya bisa anda paste di /etc/squid/passwd seperti ini:
      jadoel.info:sa3tHJ3/KuYvI
      Cara Install dan setting Squid Proxy di CentOS 5 VPS 4
      Simpan dan exit
      Notes:
      jadoel.info ==> username
      sa3tHJ3/KuYvI ==> password hasil generate
  4. Membuat direktori cace untuk squid ( cache_dir )
    squid -z
  5. Jalankan squid proxy
    squid -D
    service squid restart
    chkconfig squid on
    Cara Install dan setting Squid Proxy di CentOS 5 VPS 8
Sekarang test squid proxy hasil praktek diatas
  • buka mozzila firefox > Tool > Option > Advanced > Network > Settings
  • Pilih Manual Proxy Configuration, lalu isikan IP VPS dan port
    Cara Install dan setting Squid Proxy di CentOS 5 VPS 6
  • Coba buat Browsing, kalau berhasil maka akan muncul pop up login untuk meminta user + pass
    Cara Install dan setting Squid Proxy di CentOS 5 VPS 7


Source : jadoel.info

Minggu, 01 Desember 2013

Cara Membuat Animasi Kartun dengan Macromedia Flash 8

Dear Brur And Ses,

Saat ini saya ingin berbagi mengenai tehnik membuat animasi menggunakan Aplikasi Macromedia Flash 8

Berikut adalah tutorialnya


Untuk Membuat sebuah animasi kartun langkah-langkahnya dapat dilakukan dengan cara sebagai berikut
1.       Buka Program Macromedia Flash 8
2.       Pilih flash document
3.       Maka akan tampil area kerja baru sebagai berikut :
4.       Untuk membuat karakter kartun langkah pertama yang harus dilakukan yaitu :
1.       Tambah new layer yang digunakan untuk bagian kepala kartun
2.       Pilih Oval Tool lalu buat lingkaran didalam area stage seperti gambar dibawah ini :
  

3.       Setelah itu gunakan subselection tool
Untuk membentuk objek yang kita inginkan contohnya kita akan membuat bentuk wajah dengan menarik titik-titik yang terdapat pada objek sehingga membentuk gambar seperti dibawah ini : 
4.       Sekarang kita akan membuat mata dan bagian-bagian wajah lainnya langkah pertama yaitu pilih  Brush Tool .
5.       Pilih ukuran Brush  dengan cara dibawah ini sesuai yang diinginkan
6.       Sebelumnya buat layer terlebih dahulu setelah itu Buat bentuk yang anda inginkan, seperti gambar dibawah ini terdapat gambar mata dan alis.
Lakukan hal yang sama untuk menggambar  hidung dan mulut.
7.       Selanjutnya untuk merubah warna suatu gambar/ objek maka dapat menggunakan  Fill Color seperti gambar dibawah ini  dan lihat hasilnya.
8.       Tahap selanjutnya kita akan membuat gambar jilbab dengan menggunakan oval tool sebelumnya buat layer baru terlebih dahulu.
 
9.       Buat lagi lingkaran, letakkan tepat berada diatas lingkaran hijau dan beri warna lain.
10.   Blok bagian lingkaran hitam yang ada diatas lingkaran hijau.
Maka gambar akan tampil seperti berikut :
11.   Setelah itu gambarkan bentuk seperti yang terlihat pada gambar untuk melengkapi bagian jilbab yang diharapkan dengan menggunakan Pen Tool. Dan letakkan dibawah layer kepala.
12.   Selanjutnya beri warna pada objek yang telah dibuat sesuai selera.seperti gambar dibawah ini :
13.   Selanjutnya lakukan hal diatas untuk membuat bagian-bagian yang lain, seperti bagian badan, tangan,pakaian, kaki dan sepatu. Tapi sebelumnya tambahkan layer baru setiap mau membuat bagian gambar yang diinginkan.seperti gambar dibawah ini :
14.   Sekarang kita akan menggerakkan gambar kartun yang telah kita buat tadi dengan cara sbb: pada frame 15 blok seluruh layer, lalu klik kanan pilih insert frame seperti gambar dibawah ini.
15.   Kita kan menggerakkan kaki, maka pilih layer kaki,klik kanan pada frame 15, klik kanan insert keyframe.
16.   Klik kanan pada frame 8 , insert key frame.
17.   Blok seluruh frame kaki, klik kanan, pilih create motion tween.
18.   Klik pada frame 8 lalu gerakkan kaki, tarik kaki keatas atau kebawah

19.   Lakukan hal tersebut untuk membuat  setiap animasi pada setiap bagian.contohnya pada bagian tangan.
20.   Selamat Mencoba. . .! ^_^
 
 
 
Menyadur dari sumber Ilmu Program Komputer

Senin, 07 Oktober 2013

Tambah Port SMTP di ZImbra di centos

  nano /opt/zimbra/postfix/conf/master.cf.in


You will see  config line bellow
smtp      inet  n       -       n       -       -       smtpd


Under that line, add the following config.

 587      inet  n       -       n       -       -       smtpd

Done, now you can setup your mail client to use your Zimbra server with that custom 587 port instead of the standard 25. The standard 25 port will still be accessible, so technically you can use either.

 Then, restart the MTA:

# su - zimbra
# zmmtactl stop
# zmmtactl start
 
 
Copy From  
1. evilangelist.com
2. http://wiki.zimbra.com

Rabu, 10 Juli 2013

Menambah Quota Kirim File di Postfix Mail Server

Some other parameters you need to change are in file php.ini which is usually located in dir /etc. Set their parameters as above or higher values as below:post_max_size = 20M
upload_max_filesize = 20M

reload or restart postfix when you're done:


service postfix reload

or

service postfix restart

There's also mailbox_size_limit directive. You need to change this if SM can not open mailbox sized more than 10 MB.

Souce : http://muhdzamri.blogspot.com

Setup Mail Server using Postfix, Dovecot and SquirrelMail in CentOS/RHEL/Scientific Linux step by step

Before install postfix, remove sendmail from the server. Because sendmail is the default MTA in Redhat/CentOS.
[root@server ~]# yum remove sendmail

Prerequisites:

  • The mail server should contain a valid MX record in the DNS server. Navigate to this link how to setup DNS server.
  • Firewall and SELinux should be disabled.
[root@server ~]# service iptables stop
[root@server ~]# service ip6tables stop
[root@server ~]# chkconfig iptables off
[root@server ~]# chkconfig ip6tables off
[root@server ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
Reboot the server.

Scenario

In this tutorial my test box
Hostname     = server.kasepuhan.net
IP Address    = 192.168.1.200/24
And my server is configured with proper MX record in DNS server.

Installation

Postfix is installed by default. If it is not installed, use the below command to install postfix.
[root@server ~]# yum install postfix

Configuration

Open the postfix config file /etc/postfix/main.cf. Find the below lines and edit them as shown below.
[root@server ~]# vi /etc/postfix/main.cf
myhostname = server.ostechnix.com ##line no 75 - uncomment and enter your host name
mydomain = ostechnix.com  ##line no 83 - uncomment and enter your domain name 
myorigin = $mydomain  ##line no 99 - uncomment
inet_interfaces = all  ##line no 116 - change to all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain  ##line no 164 - add $domain at the end
mynetworks = 192.168.1.0/24, 127.0.0.0/8  ##line no 264 - uncomment and add your network range
home_mailbox = Maildir/  ##line no 419 - uncomment
Start the postfix service.
[root@server ~]# service postfix start
Starting postfix:                                          [  OK  ]
[root@server ~]# chkconfig postfix on

Test Postfix

The commands shown in bold letters should be entered by the user. 
Note: The dot after the test command is important.
[root@server ~]# telnet localhost smtp
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 server.ostechnix.com ESMTP Postfix
ehlo localhost
250-server.ostechnix.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:
250 2.1.0 Ok
rcpt to:
250 2.1.5 Ok
data
354 End data with .
test
.
250 2.0.0 Ok: queued as 117113FF18
quit
221 2.0.0 Bye
Connection closed by foreign host.

Check Mail

Navigate to the user mail directory and check for the new mail.
[root@server ~]# cd /home/user1/Maildir/new/[root@server new]# ls
1360236956.Vfd00I35afM181256.server.ostechnix.com
[root@server new]# cat 1360236956.Vfd00I35afM181256.server.ostechnix.com Return-Path: 
X-Original-To: user1
Delivered-To: user1@ostechnix.com
Received: from localhost (localhost [IPv6:::1])
 by server.ostechnix.com (Postfix) with ESMTP id 117113FF18
 for ; Thu,  7 Feb 2013 17:05:32 +0530 (IST)
Message-Id: <20130207113547 .117113ff18="" server.ostechnix.com="">
Date: Thu,  7 Feb 2013 17:05:32 +0530 (IST)
From: user1@ostechnix.com
To: undisclosed-recipients:;
test
Thats it. Postfix working now.

Install Dovecot

[root@server ~]# yum install dovecot

Configure Dovecot

Open the dovecot config file /etc/dovecot/dovecot.conf. Find and uncomment the line as shown below.
[root@server ~]# vi /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
Open the file /etc/dovecot/conf.d/10-mail.conf and uncomment the line as shown below.
[root@server ~]# vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir  ##line no 24 - uncomment
Open the /etc/dovecot/conf.d/10-auth.conf and edit as shown below.
[root@server ~]# vi /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no  ##line no 9 - uncomment and change from yes to no.
auth_mechanisms = plain login  ##line no 97 - add the text "login"
Open the /etc/dovecot/conf.d/10-master.conf and edit as shown below.
unix_listener auth-userdb {
    #mode = 0600
    user = postfix  ##line no 83 - uncomment and enter postfix
    group = postfix  ##line no 84 - uncomment and enter postfix
Start the dovecot service.
[root@server ~]# service dovecot start
Starting Dovecot Imap:                                     [  OK  ]
[root@server ~]# chkconfig dovecot on 

Test Dovecot

The commands shown in bold should be entered by the user.
[root@server ~]# telnet localhost pop3
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user user1
+OK
pass user1
+OK Logged in.
list
+OK 1 messages:
1 428
.
retr 1
+OK 428 octets
Return-Path: 
X-Original-To: user1
Delivered-To: user1@ostechnix.com
Received: from localhost (localhost [IPv6:::1])
 by server.ostechnix.com (Postfix) with ESMTP id 117113FF18
 for ; Thu,  7 Feb 2013 17:05:32 +0530 (IST)
Message-Id: <20130207113547 .117113ff18="" server.ostechnix.com="">
Date: Thu,  7 Feb 2013 17:05:32 +0530 (IST)
From: user1@ostechnix.com
To: undisclosed-recipients:;
test
.
quit 
+OK Logging out.
Connection closed by foreign host.
[root@server ~]# 
Dovecot is working now.

Install Squirrelmail

Install EPEL repository first. And install SquirrelMail package from EPEL repository.
[root@server ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
[root@server ~]# rpm -ivh epel-release-6-8.noarch.rpm 
[root@server ~]# yum install squirrelmail
[root@server ~]# service httpd start
Starting httpd:                                            [  OK  ]
[root@server ~]# chkconfig httpd on
[root@server ~]# 

Configure Squirrelmail

Go to the squirrelmail config directory and use the command ./conf.pl to start configure as shown below.
[root@server ~]# cd /usr/share/squirrelmail/config/
[root@server config]# ./conf.pl 
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages
D.  Set pre-defined settings for specific IMAP servers
C   Turn color off
S   Save data
Q   Quit
Command >>1 
Select option 1 and set organization details.
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1.  Organization Name      : kasepuhan
2.  Organization Logo      : ../images/sm_logo.png
3.  Org. Logo Width/Height : (308/111)
4.  Organization Title     : Welcome to kasepuhan webmail
5.  Signout Page           : 
6.  Top Frame              : _top
7.  Provider link          : http://kasepuhan.net
8.  Provider name          : kasepuhan
R   Return to Main Menu
C   Turn color off
S   Save data
Q   Quit
Command >>R 
Press R to return main menu and select option 2. Enter your domain name and select dovecot in the Sendmail or SMTP parameter.
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1.  Domain                 : kasepuhan.net
2.  Invert Time            : false
3.  Sendmail or SMTP       : SMTP
A.  Update IMAP Settings   : localhost:143 (uw)
B.  Update SMTP Settings   : localhost:25
R   Return to Main Menu
C   Turn color off
S   Save data
Q   Quit
Command >> S
Once you done, press S to save datas and press Q to exit.
Add the following lines in the httpd.conf file at the end.
[root@server ~]# vi /etc/httpd/conf/httpd.conf
Alias /squirrelmail /usr/share/squirrelmail

    Options Indexes FollowSymLinks
    RewriteEngine On
    AllowOverride All
    DirectoryIndex index.php
    Order allow,deny
    Allow from all
Restart the httpd service. 
[root@server ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@server ~]# 

Create Users

[root@server ~]# useradd user1
[root@server ~]# useradd user2
[root@server ~]# passwd user1
[root@server ~]# passwd user2
Open the browser from any clients. Type the following in the address bar.
http://serveripaddress/webmail
or
http://yourdomainname/webmail
 
 
Source  http://ostechnix.wordpress.com