This file contains 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 | |
#a QC script helper | |
read -p " | |
---------------------------------------------------------------- | |
QC SCRIPT HELPER Press enter to continue Press ctrl-c to exit | |
----------------------------------------------------------------" && |
This file contains 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
###only allow GET and HEAD requests (if request method IS NOT get or head then return 405 error) | |
if ($request_method !~ ^(GET|HEAD)$ ) { | |
return 405; | |
} | |
###deny other host headers (ref scams) (if the host is not mydomain return 405 error) | |
if ($host !~* ^(mydomain.com|www.mydomain.com)$ ) { | |
return 405; | |
} | |
This file contains 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
###For RedHat distros | |
lspci -vv | grep 'Ethernet\|Serial' | awk 'NR == 1{ printf $1 } NR == 2 { print " mac " $7 }' | sed –e 's/-/:/g' -e 's/:f[ef]:f[ef]//g' -e 's/01:00.0/eth0/g' -e 's/01:00.1/eth1/g' -e 's/01:00.2/eth2/g' -e 's/01:00.3/eth3/g' > /etc/iftab && ifrename | |
###For Debian distros | |
lspci -vv | grep 'Ethernet\|Serial' | awk 'NR == 1{ printf $1 } NR == 2 { print $7 }' | sed –e 's/-/:/g' -e 's/:f[ef]:f[ef]//g' -e 's/01:00.0/eth0/g' -e 's/01:00.1/eth1/g' -e 's/01:00.2/eth2/g' -e 's/01:00.3/eth3/g' > /etc/mactab && nameif |
This file contains 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
###Displays current hostname | |
hostname | |
###shows order or nics should display I350 gigbit nics as first as these are the onboard ports (r720) | |
esxcfg-nics -l | |
###Shows IP addresses for management interfaces and vMotion | |
esxcfg-vmknic -l | grep IPv4 | |
###ExNet management gateway (public gateway) |
This file contains 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
##rename interface | |
netsh interface set interface name=”Old Name” newname=”newname” | |
##add ip config | |
netsh interface ip set address name="Public" static 192.168.0.100 255.255.255.0 192.168.0.1 | |
##add dns config | |
netsh interface ip add dns "public" 83.138.151.80 INDEX=1 | |
netsh interface ip add dns "public" 83.138.151.81 INDEX=2 |
NewerOlder