Posts

Showing posts from January, 2008

Nmap on Linux

Nmap is a very powerful tool with lots of options and features to visualize your network. Check which services are running on various hosts and find suspicious malicious programs running in your network. Even though Nmap is the swiss-army knife for network scanning, most of its benefits can be gained by the average Network Administrator without diving deep in to its complications. Chances are, most of the time you will find yourself using common switches even if you know all of them. The basic syntax for Nmap is: nmap 192.168.0.1 the above command scans the given host with defaults - standard TCP connect method (-sT option) and known ports (those specified in the /etc/services file. You may need to scan a whole subnet, in which case you can use: nmap 192.168.0.1/24 nmap 192.168.0.* both the command would do the same here. One of the simplest scan methods that I come up with almost every day is the Ping Scan: nmap -sP 192.168.0.1 Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2...

Setting Mail Server with Qmail on Fedora 3 part6

26. Installing Qqtrap # cd /home/vpopmail # mkdir -p qtrap/logs # cd qtrap # cp /downloads/qmailrocks/scripts/qtrap/qtrap-2.0.0 ./qtrap.sh # vi qtrap.sh whitelist_check () { case $WHITELIST in address@somewhere.com|address@somewhereelse.com|*entiredomain.com) echo $SENDER found in whitelist on `date "+%D %H:%M:%S"` >> /home/vpopmail/qtrap/logs/qtrap.log exit 0;; *) ;; esac } checkall () { case $BANNED_WORDS in porn|PORN|Sex|SEX) printout $BANNED_WORDS echo MESSAGE DROPPED from $SENDER because of $BANNED_WORDS on `date "+%D %H:%M:%S"` >> /home/vpopmail/qtrap/logs/qtrap.log exit 99;; *) ;; esac } # touch /home/vpopmail/qtrap/logs/qtrap.log # chown -R vpopmail:vchkpw /home/vpopmail/qtrap # chmod -R 755 /home/vpopmail/qtrap # cd /home/vpopmail/domains/yourdomain.com # vi .qmail-default | /home/vpopmail/qtrap/qtrap.sh | /home/vpopmail/bin/vdelivermail '' delete 27. Maintaining your qmail server Starting Courier-imap on boot - make sure the following 2...

Setting Mail Server with Qmail on Fedora 3 part5

21. Installing Squirrelmail # tar zxvf squirrelmail-1.4.4.tar.gz # mv squirrelmail-1.4.4 /var/www/html/webmail # mkdir /var/sqattachements # chown -R apache:apache /var/sqattachements # cd /var/www/html/webmail # chown -R apache:apache data # cd config # ./conf.pl General ------- 1. Domain : 1.2.3.4 (Enter the IP of your server here. Don't be an idiot and actually use 1.2.3.4) 2. Invert Time : false 3. Sendmail or SMTP : SMTP IMAP Settings -------------- 4. IMAP Server : localhost 5. IMAP Port : 143 6. Authentication type : login 7. Secure IMAP (TLS) : false 8. Server software : other 9. Delimiter : detect SMTP Settings ------------- 4. SMTP Server : localhost 5. SMTP Port : 25 6. POP before SMTP : false 7. SMTP Authentication : login 8. Secure SMTP (TLS) : false try to open in your browser http://www.yourdomain.com/webmail Username: postmaster@smiert.org Password: your_password # cd /var/www/html/webmail/plugins # tar zxvf change_pass-2.7-1.4.x.tar.gz # cd /var/www/html/webmail//c...

Setting Mail Server with Qmail on Fedora 3 part4

16. Starting Qmail # /downloads/qmailrocks/scripts/util/qmr_inst_check # qmailctl stop # qmailctl start # qmailctl stat You should see an output like this: /service/qmail-send: up (pid 29956) 2 seconds /service/qmail-send/log: up (pid 29960) 2 seconds /service/qmail-smtpd: up (pid 29963) 2 seconds /service/qmail-smtpd/log: up (pid 29968) 2 seconds /service/qmail-pop3d: up (pid 29971) 2 seconds /service/qmail-pop3d/log: up (pid 29972) 2 seconds messages in queue: 0 messages in queue but not yet preprocessed: 0 Congratulations, Qmail is now officially up and running and you should be able to send and receive mail on the server. Let's test your new server's POP3 service... telnet localhost 110 you should see something like this: Trying 192.168.1.10... Connected to 192.168.1.10. Escape character is '^]'. +OK user postmaster@smiert.org +OK pass your_password +OK list +OK 1 323 (there's your message!) . quit +OK Connection closed by foreign host. And now let's test yo...

Setting Mail Server with Qmail on Fedora 3 part3

11. Installing Vqadmin Vqadmin is simply a nice web based interface that will let us manage Vpopmail. Through the interface we can create new domains, new users, net quotas, enable services and much more. # cd /downloads/qmailrocks # tar zxvf vqadmin-2.3.6.tar.gz # cd vqadmin-2.3.6 # ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/html # make && make install-strip Vqadmin should install itself in the cgi-bin directory of your default website. Now you will need to add the following to your server's Apache configuration file (httpd.conf) # vi /etc/httpd/conf/httpd.conf deny from all Options ExecCGI AllowOverride AuthConfig Order deny,allow Within the Apache master config file you have to set the "AllowOveride" option to "All". Example: AllowOverride All # cd /var/www/cgi-bin/vqadmin Now you will want to create a .htaccess file to password protect the Vqadmin interface. # vi .htaccess AuthType Basic AuthUserFile /var/www/cgi-bin/.h...

Setting Mail Server with Qmail on Fedora 3 part2

6. Building the daemontools # cd /package/admin/daemontools-0.76 You will need to patch daemontools with an additional errno patch: # cd /package/admin/daemontools-0.76/src # patch # cd /package/admin/daemontools-0.76 # package/install 7. Checking qmail itself installation # ps ax you should see the daemon "svscanboot" running. If you see "svscanboot" running, you're in good shape. 8. Installing ezmlm as mailing list add-on to Qmail # cd /downloads/qmailrocks/ # tar zxvf ezmlm-0.53-idx-0.41.tar.gz # cd ezmlm-0.53-idx-0.41 # make && make setup 9. Setting up autorespond for mailboxes. # cd /downloads/qmailrocks # tar zxvf autorespond-2.0.5.tar.gz # cd autorespond-2.0.5 # make && make install 10. Installing vpopmail Vpopmail allows us to do virtual domain mail hosting. When used with mysql, all domain information (domain name, email users, passwords etc.) are all stored in a handy mysql database. The actual mail messages are NOT stored in the databa...

Setting Mail Server with Qmail on Fedora 3 part1

1. Getting the package and setting up environtment for installation Make a work directory # mkdir /downloads Change directory to working directory # cd /downloads Copy qmailrocks package to working directory # cp {dir package source}/qmailrocks.tar.gz . Extract this package # tar zxvf qmailrocks.tar.gz 2. Executing additional script Executing script for pre-installation # /downloads/qmailrocks/scripts/install/qmr_install_linux-s1.script Executing script for patching qmail # /downloads/qmailrocks/scripts/util/qmail_big_patches.script 3. Building Qmail # cd /usr/src/qmail/qmail-1.03 # make man && make setup check # ./config-fast mail.smiert.org 4. Setting up secure certificate Generate a secure certificate that will be used to encrypt your server's TLS encrypted SMTP sessions... # make cert Here's a sample of my cert configs. Country Name (2 letter code) [GB]:ID State or Province Name (full name) [Berkshire]:West Java Locality Name (eg, city) [Newbury]:Bandung Organizatio...

Pull splitting and URL Aliasing on Helix Server

Image
Basic: There are 2 Helix Server => Helix01 and Helix02. Helix01 as transmitter and Helix02 as receiver. Helix01 has sdp file but Helix02 don't have so if Helix02 can transmitting sdp file, Helix02 act as Helix Receiver. 1. setting on Helix01 2. setting on Helix02 link that will be create like this rtsp://10.10.10.3/broadcast/split/10.10.10.2:2030/rtpencoder/test.sdp we also can shorten that link with url aliasing so we get this rtsp://10.10.10.3/rtpreceiver/test.sdp Great thanks to Mas Abi, he has a great of Streaming Solution.

Setting up Helix Mobile Producer

Image
1. get your Helix Mobile Producer and get your license http://www.softpedia.com/get/Multimedia/Video/Video-Editors/Helix-Mobile-Producer.shtml 2. Install by just double click on the file 3. Running Helix Mobile Producer - File > New Job - here my experiment configuration a.   choose Export Type: 3GPPv5  Select Devices on Input Tab, then select Audio and Video that you have.  Select Broadcast: RTP on your output tab, then fill Server Address with IP address of Helix Server, Port Range: 5060-5064(default), TTL:3 (for how many hop broadcasted packet will be transmitted), and SDP file: C:\Program Files\Real\Helix Server\Content\rtpencodersdp\test.sdp. b.  Here are my value that optimal when transmitted through 3G network in Indonesia. c. Don't forget to resize display, coz it will displayed by handphone (QCIF) d. optional - File > Export Job - copy this test.sdp file to Helix Server ( /opt/app/Helix_11.1.1099/Content/rtpencodersdp ) - try to access with your Real Player, QuickTi...

Setting up Helix Server on Solaris

1.Get Helix server for solaris from http://www.realnetworks.com/products/media_delivery.html. You will get rs1111-ga-solaris-8.tar.gz ( may different version ) and license that will be send to your email. 2. Extract file # tar zxvf rs1111-ga-solaris-8.tar.gz 3. Install application including: - choose installation directory, ex: /opt/app - remember this value : - RTSP Port=554 - HTTP Port=80 - MMSPort=1755 - MonitorPort=9090 - AdminPort=19341 ( may different port ) - set your admin password # ./rs1116-ga-solaris-8.bin 4. go to your installation directory # cd /opt/app/Helix_11.1.1099 5. change dir to Content directory as Helix's root directory which place to put all of media # cd /opt/app/Helix_11.1.1099/Content/ 6. Starting Helix Server: # cd /opt/app/Helix_11.1.1099 # nohup Bin/rmserver rmserver.cfg –m 1024 & 7. Check if Helix Server is running: # ps –ef | grep rmserver 8. Go to your web administration interface http://localhost:19341 username:admin password: Here are basic in...

Setting NTP Server on Solaris 9 part2

1. Create an ntp.conf file: # vi /etc/inet/ntp.conf //Or you can copy the ntp.client file// server 10.10.10.1 server 10.10.10.2 driftfile /etc/ntp.drift multicastclient 224.0.1.1 2. Change the ownership of the file: # chown root:root /etc/inet/ntp.conf # chmod 600 /etc/inet/ntp.conf 3. Create the drift file: # touch /var/ntp/drift # chown root:root /var/ntp/drift # chmod 600 /var/ntp/drift 4. Start the NTP daemon: # /etc/init.d/xntpd start

Setting NTP Server on Solaris 9 part1

1. Create the ntp.conf file: # cp /etc/inet/ntp.server ntp.conf 2. Update the ntp.conf file if you need to add more privileges for the NTP server: # vi /etc/inet/ntp.conf server 127.127.1.0 prefer fudge 127.127.1.0 stratum 0 broadcast 224.0.1.1 ttl 4 driftfile /var/ntp/drift 3. Change the ownership of the ntp.conf file: # chown root:root /etc/inet/ntp.conf # chmod 600 /etc/inet/ntp.conf 4. Create the drift file, which is a file that contains the amount of clock error computed by the NTP daemon: # touch /var/ntp/drift # chown root:root /var/ntp/drift # chmod 600 /var/ntp/drift 5. Start the NTP daemon: # /etc/init.d/xntpd start

Setting NFS Server on Solaris 9 part2

In order to run the NFS client: # /etc/init.d/nfs.client start you can verify that the NFS daemons have started correctly: # ps -aef | egrep 'statd|lockd' daemon 211 1 0 May 16 ? 0:04 /usr/lib/nfs/statd root 213 1 0 May 16 ? 0:03 /usr/lib/nfs/lockd if we want to mount a volume that has been shared from an NFS server, we use the mount command: # mount -F nfs server1:/opt/app /opt/app You should add line above to /etc/vfstab # vi /etc/vfstab server1:/opt/app /opt/app nfs defaults 0 0 One of the best methods for determining how NFS is performing, from both a client and server perspective, is to use the nfsstat command to gather performance statistics over a period of weeks or months. In particular, counting the number of calls and bad calls can show the proportion of successful to unsuccessful requests, respectively, to the server # nfsstat -s ... Server nfs: calls badcalls 575637455 3433 ... Here, we can see that the proportion of bad calls to th...

Setting NFS Server on Solaris 9 part1

NFS server can be started manually: # /etc/init.d/nfs.server start This command will start at least two daemons: the NFS server (/usr/lib/nfs/nfsd) and the mount daemon (/usr/lib/nfs/mountd). nfsd is responsible for answering access requests from clients for shared volumes on the server, while mountd is responsible for providing information about mounted file systems. To check whether or not the NFS server has started correctly, it is possible to examine the process list for nfsd and mountd: # ps -eaf | egrep 'nfsd|mountd' root 19961 1 0 Aug 31 ? 0:09 /usr/lib/nfs/nfsd -a 16 root 370 1 0 May 16 ? 2:49 /usr/lib/nfs/mountd To actually share file systems and directories,you can use the share command. For example, if you want to share the /opt/app directory from server1 to client1, client2, and client3: # share -F nfs -o rw=client1,client2,client3 -d "app" /opt/app You should add line above to /etc/dfs/dfstab # vi /etc/dfs/dfstab share -F nfs...