Solutionist's Blog

Tech | Health | Life | Travel

enable passive mode in VSFTP

FTP hangs or throws these error after a successful login. Vsftp – ftp: connect: No route to host This is because the FTP-data port is blocked by a firewall. 1. Make sure that passive mode is enabled (vsftp enables it by default). Check the file /etc/vsftpd/vsftpd.conf, for the following lines  pasv_enable=YES 2. Also check whether […]

While Loop bash / shell example

I really like to use this as the bash while loop is a control flow statement that allows code or commands to be executed repeatedly based on a given condition. while [ condition ] do command1 done i run this loop to show my EXIM mailq count every minute while true; do date && echo […]

Skip or Bypass a Fsck on boot

  method 1: Temp: on boot from GRUB Menu selecy kernel line and press e  then add fast boot at the end of the line , press ENTER and Press b  to boot Permanent: /boot/grub/grub.conf Find kernel line and put fastboot at the end of the kernel line. In the end it should look as follow: kernel […]

setup multi default gateway under linux

If you need to configure a linux in different network with different gteway this howto is for you. I present you a solution to do the multi default gateway under linux based on iproute2 commande line. Schema example : Step 1 : Creation of the table definition in iproute2: root# cat /etc/iproute2/rt_tables # reserved values […]

Find files between two dates

To print all the files from 19-10-2007 to 21-11-2007 $ find . -type f -exec ls -l –time-style=full-iso {} \; | awk ‘{print $6,$NF}’ | awk ‘{gsub(/-/,””,$1);print}’ | awk ‘$1>= 20071019 && $1<= 20071121 {print $2}’   and you can combined it with CP to find and copy files

squid: block particular file extension .mp3 block

First open squid.conf file /etc/squid/squid.conf: # vi /etc/squid/squid.conf Now add following lines to your squid ACL section: acl blockfiles urlpath_regex “/etc/squid/multimedia.files.acl” Now create the the file # vi /etc/squid/multimedia.files.acl \.[Ee][Xx][Ee]$ \.[Aa][Vv][Ii]$ \.[Mm][Pp][Gg]$ \.[Mm][Pp][Ee][Gg]$ \.[Mm][Pp]3$ Save and close the file and Restart Squid: # /etc/init.d/squid restart Courtesy: http://linuxpoison.blogspot.tw/2007/10/block-mp3-mpg-mpeg-exe-files-using.html   but Cybercity blog goes one step further […]

Secured By miniOrange