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/sh | |
# chkconfig: 2345 60 20 | |
# description: node_exporter | |
# Source function library. | |
. /etc/init.d/functions | |
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
#LDAP | |
plugin /usr/local/lib/openvpn-auth-ldap.so "/etc/openvpn/auth/ldap.conf" | |
#plugin /usr/local/lib/openvpn/openvpn-otp.so "password_is_cr=1 otp_secrets=/etc/openvpn/auth/otp-secrets" | |
#script-security 2 | |
script-security 3 | |
# untrusted state | |
#client-connect /etc/openvpn/scripts/client-connect.sh |
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
server { | |
# Listen on port 80 for any IPv4 address on this server | |
# listen docs: http://wiki.nginx.org/HttpCoreModule#listen | |
listen 80; | |
# Listen on only the selected hostname... | |
server_name <HOSTNAME>; | |
# ...or use the catchall character if you want to handle multiple hostnames | |
# server_name _; |
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/sh | |
#original from http://community.spiceworks.com/topic/262635-linux-does-not-register-on-the-windows-ad-dns | |
# reply of Phil6196 Oct 1, 2012 at 12:41 AM (EDT) | |
ADDR=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e s/.*://` | |
HOST=`hostname` | |
echo "update delete $HOST A" > /var/nsupdate.txt | |
echo "update add $HOST 86400 A $ADDR" >> /var/nsupdate.txt | |
echo "update delete $HOST PTR" > /var/nsupdate.txt | |
echo "update add $HOST 86400 PTR $ADDR" >> /var/nsupdate.txt | |
nsupdate /var/nsupdate.txt |
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
<?php | |
////判断IP是不是在白名单内的算法-PHP | |
////$_SERVER['REMOTE_ADDR'] = $_SERVER['argv'][1]; | |
$ip="10.1.1.1"; | |
$client = sprintf('%u', ip2long($ip)); | |
$whitelist = array('127.0.0.0/10', '10.0.0.0/8', '192.168.1.0/24','60.207.94.32/27'); | |
$whitelisted = false; | |
foreach ($whitelist as $range) { |