Wednesday, February 27, 2013

debian fresh install can't start services under /etc/init.d

If for any reason you can't start any services under /etc/init.d after a fresh installation of debian, you may try "apt-get install --reinstall dpkg"

Friday, February 15, 2013

iptables slow down http and https

With:

-P INPUT DROP
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

Websites on the server will response very slowly.

But if you add:

 -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

 Websites will response fast as usual.

Saturday, February 9, 2013

how to mount samba fs to directory in linux


mount //some_server/share /home/grml/smbfs/share -o "user=share,password=****,uid=grml,gid=grml"

but if your password is complex (e.g. contains special characters), better use -o "credentials=/path/to/credential"

credential file format is:

username
password

On Debian 7.0, you will need to "apt-get install cifs-utils" first to get mount.cifs.