Last active
December 28, 2015 11:49
-
-
Save tekk555/7496445 to your computer and use it in GitHub Desktop.
CentOSにDelegateをインストールする。RDPをHTTPS(443)Portでリレーする。
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
# yum install gcc gcc-c++ make openssl-devel | |
# yum wget | |
# wget ftp://ftp.delegate.org/pub/DeleGate/delegate9.9.7.tar.gz | |
# tar zxvf delegate9.9.7.tar.gz | |
# cd delegate9.9.7 | |
# make | |
(途中で管理者宛のメールアドレスを聞かれるので入力してEnterを押す) | |
# cp src/delegated /usr/local/sbin/ | |
# ln /usr/local/sbin/delegated /usr/sbin/delegated | |
# mkdir /etc/delegate | |
# mkdir /var/spool/delegate-nobody/cache | |
# chown nobody:nobody /var/spool/delegate-nobody | |
# chown nobody:nobody /var/spool/delegate-nobody/* | |
# chmod 755 /var/spool/delegate-nobody | |
# chmod 755 /var/spool/delegate-nobody/* | |
# vi /etc/init.d/delegated | |
(以下の内容で設定ファイルを作成する) | |
<!-- | |
#!/bin/sh | |
# | |
# chkconfig: 35 90 10 | |
# description: delegated ftp proxy | |
# processname: delegated | |
# config: /etc/delegate/*.conf | |
DELEGATE=/usr/sbin/delegated | |
CONFDIR=/etc/delegate | |
DGROOT=/var/spool/delegate-nobody | |
if [ ! -x $DELEGATE ]; then | |
echo -n $"$DELEGATE does not exist."; warning; echo | |
exit 0 | |
fi | |
if [ ! -r $CONFDIR ]; then | |
echo -n $"$CONFDIR does not exist."; warning; echo | |
exit 0 | |
fi | |
RETVAL=0 | |
start() { | |
echo -n $"Starting up Http DeleGate daemon: " | |
for CONFIG in $CONFDIR/*.conf ; do | |
$DELEGATE DGROOT=$DGROOT +=$CONFIG | |
echo | |
done | |
return 0 | |
} | |
stop() { | |
echo -n $"Shutting down Http DeleGate daemon: " | |
for CONFIG in $CONFDIR/*.conf ; do | |
$DELEGATE DGROOT=$DGROOT +=$CONFIG -Fkill | |
echo | |
done | |
return 0 | |
} | |
restart() { | |
stop | |
start | |
} | |
# See how we were called. | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
restart | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit 0 | |
--> | |
# chmod 755 delegated | |
# chkconfig --list | grep delegated | |
# chkconfig delegated on | |
# vi /etc/delegate/rdp.conf | |
-P443 | |
SERVER=tcprelay://192.168.0.10:3389 | |
ADMIN=hogehoge@hogehoge.co.jp | |
RELIABLE=* | |
REACHABLE=* | |
# service iptables stop | |
# chkconfig iptables off | |
# chkconfig --list | grep iptables | |
# shutdown -r now | |
# /usr/sbin/delegated -P443 SERVER="tcprelay://192.168.0.10:3389" ADMIN="hogehoge@hogehoge.co.jp" RELIABLE="*" REACHABLE="*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment