mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-11-02 13:32:53 +00:00
Compare commits
3 commits
6faf600d40
...
3232781a6d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3232781a6d | ||
|
|
1c259e8b10 | ||
|
|
8e79c596f3 |
3 changed files with 34 additions and 0 deletions
|
|
@ -478,6 +478,21 @@
|
||||||
tags:
|
tags:
|
||||||
- "Ubuntu"
|
- "Ubuntu"
|
||||||
|
|
||||||
|
- name: Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, openSUSE Tumbleweed, Raspbian, Rocky, Ubuntu)
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: '^(Port (?!64295$)[0-9]+)'
|
||||||
|
replace: '# \1'
|
||||||
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
|
tags:
|
||||||
|
- "AlmaLinux"
|
||||||
|
- "Debian"
|
||||||
|
- "Fedora"
|
||||||
|
- "openSUSE Tumbleweed"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Rocky"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
- name: Change SSH Port to 64295 (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu)
|
- name: Change SSH Port to 64295 (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,21 @@
|
||||||
- "Rocky"
|
- "Rocky"
|
||||||
- "Ubuntu"
|
- "Ubuntu"
|
||||||
|
|
||||||
|
- name: Revert Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, openSUSE Tumbleweed, Raspbian, Rocky, Ubuntu)
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: '^# (Port (?!22$)[0-9]+)'
|
||||||
|
replace: '\1'
|
||||||
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
|
tags:
|
||||||
|
- "AlmaLinux"
|
||||||
|
- "Debian"
|
||||||
|
- "Fedora"
|
||||||
|
- "openSUSE Tumbleweed"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Rocky"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
- name: Remove vm.max_map_count setting (All)
|
- name: Remove vm.max_map_count setting (All)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/sysctl.conf
|
path: /etc/sysctl.conf
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,10 @@ function fuRESTORE () {
|
||||||
fi
|
fi
|
||||||
echo "### Restoring T-Pot config file .env"
|
echo "### Restoring T-Pot config file .env"
|
||||||
tar xvf $myARCHIVE .env -C $HOME/tpotce >/dev/null 2>&1
|
tar xvf $myARCHIVE .env -C $HOME/tpotce >/dev/null 2>&1
|
||||||
|
# Backup file (.env) contains a record of the TPOT_VERSION that is used in docker-compose commmands.
|
||||||
|
# We should upgrade the version in this file after restoring the backup.
|
||||||
|
newVERSION=$(cat version)
|
||||||
|
sed -i "s/^TPOT_VERSION=.*/TPOT_VERSION=${newVERSION}/" $HOME/tpotce/.env
|
||||||
}
|
}
|
||||||
|
|
||||||
################
|
################
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue