add systemd services, hosts.allow, hosts.deny
This commit is contained in:
parent
292a6e881d
commit
765fd0392a
2
etc/hosts.allow
Normal file
2
etc/hosts.allow
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
sshd:192.168.1.0/24:allow
|
||||||
|
sshd:127.0.0.1:allow
|
1
etc/hosts.deny
Normal file
1
etc/hosts.deny
Normal file
@ -0,0 +1 @@
|
|||||||
|
sshd:ALL
|
20
etc/init.d/frps
Normal file
20
etc/init.d/frps
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: newnius
|
||||||
|
# Required-Start: $local_fs $network
|
||||||
|
# Required-Stop: $local_fs
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: remote control
|
||||||
|
# Description: remote control
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
/usr/local/frp/frpc -c /usr/local/frp/frpc.ini
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
20
lib/systemd/system/frpc.service
Normal file
20
lib/systemd/system/frpc.service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Frp Client
|
||||||
|
After=network.target
|
||||||
|
ConditionPathExists=/usr/local/frp/frpc
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
#EnvironmentFile=-/etc/default/ssh
|
||||||
|
#ExecStartPre=/usr/sbin/sshd -t
|
||||||
|
ExecStart=/usr/local/frp/frpc -c /usr/local/frp/frpc.ini
|
||||||
|
#ExecStop=/usr/local/ss/stop.sh
|
||||||
|
#ExecReload=/usr/sbin/sshd -t
|
||||||
|
#ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
#KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
#RestartPreventExitStatus=255
|
||||||
|
#Type=notify
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=frpc.service
|
20
lib/systemd/system/ss-server.service
Normal file
20
lib/systemd/system/ss-server.service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Shadowsocks Server
|
||||||
|
After=network.target
|
||||||
|
ConditionPathExists=/usr/local/ss/shadowsocks-server
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
#EnvironmentFile=-/etc/default/ssh
|
||||||
|
#ExecStartPre=/usr/sbin/sshd -t
|
||||||
|
ExecStart=/usr/local/ss/shadowsocks-server -c /usr/local/ss/config.json
|
||||||
|
ExecStop=/usr/local/ss/stop.sh
|
||||||
|
#ExecReload=/usr/sbin/sshd -t
|
||||||
|
#ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
#KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
#RestartPreventExitStatus=255
|
||||||
|
#Type=notify
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=ss.service
|
Loading…
Reference in New Issue
Block a user