29
Oct/082
Oct/082
Linux: Reset iptables firewall rules
Create a shell script (iptables_flush.sh) and copy paste the following lines:
#!/bin/sh echo "Flushing iptables rules..." sleep 1 iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT
Make the file executable
chmod +x iptables_flush.sh
and run the script:
./iptables_flush.sh
29
Oct/080
Oct/080
Linux: Download files using wget from protected url’s – resume broken downloads
To download a file from a password protected url (ftp and http):
wget --user=<username> --password=<password> <url>
Download a file to a different directory:
wget <source> -O <destination>
Resume a broken download:
wget -c <url>
29
Oct/080
Oct/080
Linux: Copy files between Linux Servers with scp
From source server:
scp /<source directory> <username>@<destination server>:/<target directory>
To copy directories recursively use “-r” option.