1. installation
curl -s http://d01cid.ddns.net/sharel/bin/inst-httpd | sh
yum -y install incron firewalld dos2unix
source /etc/cid.conf
wget -N -nv http://${rdsserver}/sharel/bin/cid-rfwd -P /bin/
chmod +x /bin/cid-rfwd
curl -s http://d01cid.ddns.net/sharel/tar/rfwd-20180422.tgz | tar xzPv -C /
2. configuration
htpasswd -b -c /opt/rfwd/pwd/.htpasswd cidusr Passw0rd
Adding password for user cidusr
vi /etc/httpd/conf.d/rfwd.conf
#
Alias /rfwd "/opt/rfwd/"
<Directory "/opt/rfwd/">
Options Indexes MultiViews FollowSymlinks
AuthType Basic
AuthName "your name and password"
AuthUserFile /opt/rfwd/pwd/.htpasswd
Require valid-user
</Directory>
systemctl restart httpd.service
vi /etc/incron.d/rfwd
#
/opt/rfwd/skl/ IN_CLOSE_WRITE /opt/rfwd/bin/rfwd-incron
systemctl restart incrond.service
3. sample configuration
vi /opt/rfwd/skl/rfwd.conf
#
#[interface]
fwdnic="eth0"
#[logging] # all unicast broadcast multicast off
fwdlog="off"
#[openvpn]
vpnnic="tun0"
vpnadd="10.99.0.0/24"
#[white services]
fwdservice="http"
fwdservice="https"
#
#[white services for a specific ip address and/or range]
fwdrule="ssh 10.1.0.0/16"
chown "apache:apache" /opt/rfwd/skl/rfwd.conf