-
-
Notifications
You must be signed in to change notification settings - Fork 27
7.1 Firewall Security Setup
Tomato6966 edited this page Nov 25, 2022
·
2 revisions
apt-get install ufw
nano /etc/ssh/sshd_config
- in there find
#Port=22
- change it to:
Port=yourwishedport
e.g.Port=5050
, the default port is 22, so you will need to specify the new connection port in your ssh like this:ssh username@hostname -p <port>
systemctl restart ssh
systemctl restart sshd
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw allow <sshPort>
sudo ufw allow 3000:3100/tcp
sudo ufw allow 3000:3100/udp
sudo ufw enable
sudo ufw allow from 203.0.113.103
sudo ufw allow from 203.0.113.103 proto tcp to any port 22
Further examples and more detailled explanations: digital ocean blog
-
1 All needed Console Commands
- 1.1 Directory Navigation
- 1.2 System Information
- 1.3 Hardware Information
- 1.4 File and Directory Cmds
- 1.5 Process Management
- 1.6 File Permissions
- 1.7 Networking
- 1.8 Archives (Tar Files)
- 1.9 Search
- 1.10 File Transfers
- 1.11 Disk Usage
- 1.12 User Information and Management
- 1.13 Speedtest
- 1.14 Clear Cache
- 1.15 Disable Sleeping Processes (Suspending)
- 1.16 Remove Welcome Message