https://github.com/simon816/mcfirewall
Adds a firewall to your Minecraft server in case you can't use a system firewall
https://github.com/simon816/mcfirewall
Last synced: about 2 months ago
JSON representation
Adds a firewall to your Minecraft server in case you can't use a system firewall
- Host: GitHub
- URL: https://github.com/simon816/mcfirewall
- Owner: simon816
- License: mit
- Created: 2019-03-06T22:00:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-06T22:01:37.000Z (over 7 years ago)
- Last Synced: 2025-03-02T13:50:35.436Z (over 1 year ago)
- Language: Java
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MCFirewall
Adds a firewall to your server in case you can't use a system firewall. Using a system firewall is still recommended.
Supports:
- Forge
- Sponge Forge
- Sponge Vanilla
On loading, a `firewall.txt` file is created in the root directory (where `server.properties` is).
The format is a list of rules. Rules are processed in the order listed, first match wins.
Rules are given as an IP address range in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation. If a rule matches, the action is either to accept or reject.
Example firewall.txt:
```
# Allow loopback IP range
127.0.0.0/8 ALLOW
# Block everything else
0.0.0.0/0 BLOCK
```
ACCEPT and REJECT are also valid words.
Use `/firewall reload` from server console or an opped player to reload the rules from the file.
Every connection attempt is logged in the server console (and log file).
In the event of a flood, the logger is rate limited:
If more than 5 messages are logged each less than 2 seconds apart, then no messages are logged for the next 10 seconds.