https://github.com/noraworld/ufw-conf
https://github.com/noraworld/ufw-conf
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/noraworld/ufw-conf
- Owner: noraworld
- License: mit
- Created: 2022-07-14T17:25:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-30T01:26:16.000Z (9 months ago)
- Last Synced: 2025-01-30T02:25:18.667Z (9 months ago)
- Language: Shell
- Size: 46.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ufw-conf
UFW config files.## Setup
```shell
cd ufw-confsudo rm /etc/default/ufw
sudo ln -s $PWD/etc/default/ufw /etc/defaultsudo rm -r /etc/ufw
sudo ln -s $PWD/etc/ufw /etc
```## Start daemon
```shell
sudo ufw enable
sudo systemctl start ufw
sudo systemctl enable ufw
```## Restart daemon
```shell
sudo ufw reload
sudo systemctl restart ufw
```## Check daemon status
```shell
sudo ufw status
sudo systemctl status ufw
```## Blocked forwarding ports
The forwarding ports except for well-known ones are blocked by default, but these ones are accepted exceptionally.| Port | Proto | Purpose |
| :-----------: | :-------: | -------------------- |
| 60313 | TCP / UDP | SSH |
| 50000 - 51819 | UDP | Discord (voice chat) |
| 51821 - 65535 | UDP | Discord (voice chat) |The port `51820` is used for [NordVPN WireGuard](https://chatgpt.com/share/6734528b-0d14-8004-9253-770de34c4db2).
## Cautions
You shouldn't update the settings manually or comment in the file in this repository because they are overwritten by the `ufw` command.---
If you modify the UFW configuration illegally, like the following, it's sometimes disabled (the value of "ENABLED" is turned into "no" in `etc/ufw/ufw.conf`) automatically, which causes network issues and the infinite application.
```shell
printf "*filter\nCOMMIT\n*nat\nCOMMIT\n" | sudo iptables-restore; sudo ufw reload
```## Troubleshootings
If you suspect the UFW rules are reloaded repeatedly and it causes the network issue, you can check the following command to detect the repeated reloading.```shell
watch -t -n 0.5 git diff
```