Reduce false positives from alive checker
This commit is contained in:
parent
e8d24444be
commit
d402fc464a
3 changed files with 37 additions and 19 deletions
|
@ -1 +1,9 @@
|
|||
iptables -t nat -A INPUT -p tcp --dport 25565 -j SNAT --to-source 192.168.1.100
|
||||
# IPv4
|
||||
iptables -t nat -A INPUT -p tcp --dport 25565 -j SNAT --to-source 192.168.1.0-192.168.100.100
|
||||
iptables -t nat -A INPUT -p udp --dport 19132 -j SNAT --to-source 192.168.1.0-192.168.100.100
|
||||
iptables -A INPUT -p tcp --syn --dport 25565 -m connlimit --connlimit-above 5 --connlimit-mask 32 -j REJECT --reject-with tcp-reset
|
||||
|
||||
# IPv6
|
||||
ip6tables -t nat -A INPUT -p tcp --dport 25565 -j SNAT --to-source 2001:db8::1-2001:db8::6464
|
||||
ip6tables -t nat -A INPUT -p udp --dport 19132 -j SNAT --to-source 2001:db8::1-2001:db8::6464
|
||||
ip6tables -A INPUT -p tcp --syn --dport 25565 -m connlimit --connlimit-above 5 --connlimit-mask 32 -j REJECT --reject-with tcp-reset
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
|
||||
PATH="$HOME/framework/vendor/java/bin/:$PATH"
|
||||
|
||||
dtach -n alivecheck ~/framework/script/alivecheck.sh
|
||||
|
||||
# Make sure we're in the server folder, located in the home directory
|
||||
cd ~/server/
|
||||
|
||||
while true; do
|
||||
# Make certain files and folders read-only
|
||||
|
||||
chmod -R 500 plugins/bStats/
|
||||
|
@ -25,7 +24,18 @@ chmod 400 server.properties
|
|||
chmod 400 spigot.yml
|
||||
chmod 400 wepif.yml
|
||||
|
||||
while true; do
|
||||
# Start alive checker
|
||||
|
||||
dtach -n alivecheck ~/framework/script/alivecheck.sh
|
||||
|
||||
# Start Minecraft server
|
||||
|
||||
java -Xmx1800M -Xss8M -Xtune:virtualized -Xaggressive -Xcompressedrefs -Xdump:heap+java+snap+system:none -Xdump:tool:events=throw+systhrow,filter=java/lang/OutOfMemoryError,exec="kill -9 %pid" -Xgc:concurrentScavenge -Xgc:dnssExpectedTimeRatioMaximum=3 -Xgc:scvNoAdaptiveTenure -Xdisableexplicitgc -Xshareclasses -Xshareclasses:noPersistentDiskSpaceCheck -XX:MaxDirectMemorySize=128M -XX:+ClassRelationshipVerifier -XX:+GlobalLockReservation -XX:+UseContainerSupport -DPaper.IgnoreJavaVersion=true -Dpaper.playerconnection.keepalive=360 -DIReallyKnowWhatIAmDoingISwear -jar server.jar nogui
|
||||
|
||||
# Stop alive checker (will be started again on the next run)
|
||||
|
||||
killall alivecheck.sh
|
||||
|
||||
# Ensure we don't abuse the CPU in case of failure
|
||||
sleep 1
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue