Add SSH port 28
This commit is contained in:
parent
0577d4ff9d
commit
f7837e68b5
1 changed files with 14 additions and 1 deletions
15
deploy.py
15
deploy.py
|
@ -31,9 +31,22 @@ apt.packages(
|
||||||
update=False,
|
update=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
files.line(
|
||||||
|
name='Set port 28 for SSH',
|
||||||
|
path='/etc/ssh/sshd_config',
|
||||||
|
line=r'Port .*',
|
||||||
|
replace='Port 28',
|
||||||
|
)
|
||||||
|
|
||||||
|
systemd.service(
|
||||||
|
name='Reload sshd',
|
||||||
|
service='ssh.service',
|
||||||
|
reloaded=True,
|
||||||
|
)
|
||||||
|
|
||||||
server.shell(
|
server.shell(
|
||||||
name='Add ufw rules',
|
name='Add ufw rules',
|
||||||
commands=['ufw limit 22', 'ufw allow 80', 'ufw allow 443', 'ufw allow 853'],
|
commands=['ufw limit 28', 'ufw allow 80', 'ufw allow 443', 'ufw allow 853'],
|
||||||
)
|
)
|
||||||
|
|
||||||
server.shell(
|
server.shell(
|
||||||
|
|
Reference in a new issue