Posted in February 9th, 2008
Here is how to find all broken links and backup files on your Linux system. Run as root:
#find / -type l ! -path “/proc*” | (while read FN ; do test -e “$FN” || ls -l “$FN”; done)
or
#find / -type l ! -path “/proc*” | (while read FN ; do test -e “$FN” || echo [...]
Continue reading...
Tags:
Linux
Posted in February 9th, 2008
Shell script for setting up stateful firewall based on iptables.
Suitable for personal use
Protects your computer from outside world attacks
Handling packets based on connection state (ESTABLISHED, RELATED)
OS Linux
Shell script entry:
#!/bin/sh
# Shell script for stateful firewall based on iptables
Version=1.0.1
PATH=/sbin:/usr/sbin:/bin:/usr/bin
ME=$(basename “$0″) # program name as invoked
IPTABLES=’/sbin/iptables’
# Must be root
if [ "$(/usr/bin/id -u)" != 0 ] ; then
[...]
Continue reading...
Tags:
Linux
Posted in February 9th, 2008
When you download files with wget and must login you need to specify username and password. This can be done:
As command line options –ftp-user=username –ftp-password=password
In the URL itself ftp://username:password@domain/directory/file
In .wgetrc file
First two methods are insecure, because they reveal your password to everyone who runs “ps” command . Last method is secure from this point of [...]
Continue reading...
Tags:
Linux