This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IPT="/sbin/iptables" | |
INT_INTERFACE="eth0" | |
LOO_INTERFACE="lo" | |
IPADDR="" | |
SUBNET_BASE="" | |
SUBNET_BROADCAST="" | |
MY_ISP="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Functiond used for ensuring that file passed as argument has UNIX EOL | |
ensure_unix_eol(){ | |
local file=$1 | |
if [[ $# -eq 0 ]]; then | |
echo -e "\nERROR: No arguments passed. Script cannot continue. Exiting...\n" | |
exit 1 | |
elif [[ $# -gt 1 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
add_color(){ | |
#colors declaration | |
NORMAL='\\033[0m' | |
GREEN='\\033[0;32m' | |
RED='\\033[0;31m' | |
YELLOW='\\033[0;33m' | |
#recognize INFO,ERROR,SUCCESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#eth0 interface configuration | |
TYPE=Ethernet | |
NAME=eth0 | |
DEVICE=eth0 | |
ONBOOT=yes | |
BOOTPROTO=static | |
IPADDR=192.168.0.100 | |
DEFROUTE=yes | |
IPV4_FAILURE_FATAL=no | |
MTU=1462 |
NewerOlder