docs(step1): add txt ufw toggle ssh eth0 on off
This commit is contained in:
26
doc/step-001-ufw-toggle-ssh-eth0.txt
Normal file
26
doc/step-001-ufw-toggle-ssh-eth0.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Step 001: Toggle SSH na publicznym interfejsie eth0 (ON/OFF) przez UFW
|
||||
|
||||
Zalozenie:
|
||||
- SSH po WireGuard (wg0) zostaje zawsze wlaczone.
|
||||
- Publiczne SSH po eth0 wlaczasz/wylaczasz tylko regula UFW.
|
||||
- UFW musi byc aktywne (status != inactive).
|
||||
|
||||
1) Zawsze zostaw SSH po wg0:
|
||||
sudo ufw allow in on wg0 to any port 22 proto tcp
|
||||
|
||||
2) ON: wlacz SSH po eth0 (public):
|
||||
sudo ufw allow in on eth0 to any port 22 proto tcp
|
||||
sudo ufw status verbose
|
||||
|
||||
3) OFF: wylacz SSH po eth0 (public):
|
||||
sudo ufw deny in on eth0 to any port 22 proto tcp
|
||||
sudo ufw status verbose
|
||||
|
||||
4) (Opcjonalnie) Usuniecie konkretnej reguly:
|
||||
sudo ufw status numbered
|
||||
sudo ufw delete <NUMER_REGULY_DLA_22_NA_eth0>
|
||||
|
||||
Uwaga:
|
||||
- Jesli `sudo ufw status` pokazuje "inactive", to reguly nie dzialaja. Wtedy najpierw:
|
||||
sudo ufw enable
|
||||
|
||||
Reference in New Issue
Block a user