refresh
This commit is contained in:
parent
4521c9ce7c
commit
aeaa845ef0
30
README.md
30
README.md
@ -4,8 +4,9 @@ To switch user use:
|
|||||||
# To DO
|
# To DO
|
||||||
- [ ] Do not stack mods in this repo
|
- [ ] Do not stack mods in this repo
|
||||||
- [x] Remaking log coments to make sense
|
- [x] Remaking log coments to make sense
|
||||||
|
- [ ] Update linnks for download
|
||||||
- [ ] Better handeling farwarding secrets
|
- [ ] Better handeling farwarding secrets
|
||||||
- [ ] Research new modpack
|
- [x] Research new modpack
|
||||||
- [ ] Configuration fo playersync
|
- [ ] Configuration fo playersync
|
||||||
|
|
||||||
## Proxmox level up
|
## Proxmox level up
|
||||||
@ -17,36 +18,23 @@ To switch user use:
|
|||||||
- 3306 db accept
|
- 3306 db accept
|
||||||
|
|
||||||
# Changes
|
# Changes
|
||||||
|
- [ ] firewall by prox
|
||||||
|
|
||||||
## Server side
|
## Server side
|
||||||
- [ ] Remove ftb stack
|
- [ ] [Proxy-compatible-forge](https://cdn.modrinth.com/data/vDyrHl8l/versions/K43ePlgq/proxy-compatible-forge-1.20-1.1.4.jar)
|
||||||
- [x] [Proxy-compatible-forge](https://cdn.modrinth.com/data/vDyrHl8l/versions/K43ePlgq/proxy-compatible-forge-1.20-1.1.4.jar)
|
- [ ] [SkinRestorer](https://modrinth.com/mod/skinrestorer)
|
||||||
- [x] [SkinRestorer](https://modrinth.com/mod/skinrestorer)
|
- [ ] [PlayerSync](https://github.com/mlus-asuka/PlayerSync)
|
||||||
- [x] [PlayerSync](https://github.com/mlus-asuka/PlayerSync)
|
- [x] [Open parties and chunks](https://modrinth.com/mod/open-parties-and-claims)
|
||||||
- [ ] [Prometheus permmisions](https://modrinth.com/mod/prometheus)
|
|
||||||
- [ ] [Open parties and chunks](https://modrinth.com/mod/open-parties-and-claims)
|
|
||||||
- [ ] Disable ~/world/serverconfig/open*.serer.toml chunkProtectClaim = true > false
|
- [ ] Disable ~/world/serverconfig/open*.serer.toml chunkProtectClaim = true > false
|
||||||
- [ ] [Argonauts for parties](https://modrinth.com/mod/argonauts)
|
|
||||||
- [ ] Add Create Essenctials (jatpacky)
|
|
||||||
|
|
||||||
## Client side
|
## Client side
|
||||||
- [ ] Remove Leakyfi
|
- [ ] Clean it up and make it rain
|
||||||
- [ ] Remove ftb stack
|
|
||||||
- [ ] Remove ChunkLoaders
|
|
||||||
- [ ] [Open parties and chunks](https://modrinth.com/mod/open-parties-and-claims)
|
|
||||||
- [ ] [Argonauts for party](https://modrinth.com/mod/argonauts)
|
|
||||||
- [ ] Enable create esentials (jatpacky)
|
|
||||||
- [ ] Prometheus for TeamLeadrs
|
|
||||||
|
|
||||||
### Chunkloaders dilema
|
|
||||||
- [x] PowerLoaders + OpenParties&Claims
|
|
||||||
- both
|
|
||||||
- one > whitch???
|
|
||||||
|
|
||||||
### World gen dilema
|
### World gen dilema
|
||||||
- [ ] [Tectonic world gen](https://modrinth.com/datapack/tectonic)
|
- [ ] [Tectonic world gen](https://modrinth.com/datapack/tectonic)
|
||||||
- [ ] https://modrinth.com/mod/custom-world-generation/version/2.0.0
|
- [ ] https://modrinth.com/mod/custom-world-generation/version/2.0.0
|
||||||
|
|
||||||
|
https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.217/neoforge-21.1.217-installer.jar
|
||||||
|
|
||||||
## Vlacky web / dynmap
|
## Vlacky web / dynmap
|
||||||
- [ ] Candy to tailscale serve
|
- [ ] Candy to tailscale serve
|
||||||
|
|||||||
191
mc-install.sh
191
mc-install.sh
@ -4,78 +4,6 @@ printf "Better to run as root, because of permisions handeling.\n"
|
|||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
### Deb12 > Deb13 ###
|
|
||||||
|
|
||||||
printf "Do you want to update from Debian 12 into Debian 13? [Y/n]: \n"
|
|
||||||
read ansDebUpdate
|
|
||||||
|
|
||||||
|
|
||||||
### LXC SSH configuration ###
|
|
||||||
|
|
||||||
printf "Are you using LXC and want to set up full SSH server? [Y/n]: \n"
|
|
||||||
read ansLxcSshServer
|
|
||||||
|
|
||||||
if [[ "$ansLxcSshServer" =~ ("N"|"n") ]]; then
|
|
||||||
printf "+ Thanks, working on next bit\n"
|
|
||||||
|
|
||||||
elif [[ "$ansLxcSshServer" =~ ("Y"|"y") || -z $ansLxcSshServer ]]; then
|
|
||||||
printf "+ Setting up full ssh server\n"
|
|
||||||
|
|
||||||
systemctl disable ssh.socket
|
|
||||||
systemctl enable ssh
|
|
||||||
|
|
||||||
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
|
|
||||||
|
|
||||||
else
|
|
||||||
printf "\nHope you know what you are doing, I am not able to check your answer."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
### Firewall ###
|
|
||||||
|
|
||||||
printf "Do you want to set up firewall rules by iptables? [Y/n]: \n"
|
|
||||||
read ansFirewallSetup
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$ansFirewallSetup" =~ ("N"|"n") ]]; then
|
|
||||||
|
|
||||||
printf "+ Thanks, working on next bit\n"
|
|
||||||
|
|
||||||
|
|
||||||
elif [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then
|
|
||||||
|
|
||||||
printf "Do you want to block non-LAN ssh connections? [Y/n/castom]: "
|
|
||||||
read sshBlockRange
|
|
||||||
|
|
||||||
|
|
||||||
if [[ $sshBlockRange =~ ("n"|"N") ]]; then
|
|
||||||
|
|
||||||
printf "+ OK, working on next bit\n"
|
|
||||||
ipList=""
|
|
||||||
|
|
||||||
elif [[ $sshBlockRange =~ ("y"|"Y") || -z $sshBlockRange ]]; then
|
|
||||||
|
|
||||||
#Pipes all informations about ip interfaces
|
|
||||||
ipList=$(ip -o -4 a show scope global)
|
|
||||||
|
|
||||||
#Founds data in pattern
|
|
||||||
ipList=$(echo $ipList | grep -Eo "([0-9]*\.){3}[0-9]*/[0-9]*")
|
|
||||||
|
|
||||||
#substitues space for coma
|
|
||||||
ipList=$(echo $ipList | tr " " ",")
|
|
||||||
|
|
||||||
printf "+ Accepting SSH connections only on these ip's: $ipList\n"
|
|
||||||
|
|
||||||
|
|
||||||
else
|
|
||||||
printf "\nHope you know what you are doing, I am not checking these :]"
|
|
||||||
|
|
||||||
printf "\nSubmit your IP range to acces SSH in format 192.168.1.1/24
|
|
||||||
\nYour IP range: "
|
|
||||||
read ipList
|
|
||||||
printf "\n+ Allowing SSH on this range: $ipList \n"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
### RAM ###
|
### RAM ###
|
||||||
|
|
||||||
@ -113,22 +41,6 @@ apt update
|
|||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
apt autoremove --purge -y
|
apt autoremove --purge -y
|
||||||
|
|
||||||
if [[ "$ansDebUpdate" =~ ("N"|"n") ]]; then
|
|
||||||
printf "+ Not upgrading to Debian 13, may cause problems with java versions. Hope you know what you are doing.\n"
|
|
||||||
|
|
||||||
elif [[ "$ansDebUpdate" =~ ("Y"|"y") || -z $ansDebUpdate ]]; then
|
|
||||||
printf "+ Working on updating Debian 12 Bookworm into Debian 13 Trixie"
|
|
||||||
|
|
||||||
# changes every bookworm int trixie
|
|
||||||
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
|
|
||||||
|
|
||||||
apt update
|
|
||||||
apt full-upgrade -y
|
|
||||||
|
|
||||||
else
|
|
||||||
printf "\nHope you know what you are doing, I am not able to check your answer."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
### Installing depandencies ###
|
### Installing depandencies ###
|
||||||
|
|
||||||
@ -137,13 +49,9 @@ fi
|
|||||||
printf "\n+ Installing depandencies \n\n"
|
printf "\n+ Installing depandencies \n\n"
|
||||||
apt install openjdk-21-jre-headless screen p7zip-full -y
|
apt install openjdk-21-jre-headless screen p7zip-full -y
|
||||||
|
|
||||||
if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then
|
|
||||||
|
|
||||||
apt install iptables -y
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
### User and groupe managment ###
|
### User and groupe managment ###
|
||||||
|
|
||||||
printf "\n+ Creating user minecraft and basic file structure"
|
printf "\n+ Creating user minecraft and basic file structure"
|
||||||
groupadd minecraft
|
groupadd minecraft
|
||||||
|
|
||||||
@ -156,13 +64,14 @@ cd /opt/minecraft/
|
|||||||
|
|
||||||
### Download forge server ###
|
### Download forge server ###
|
||||||
printf "+ Downloading and installing Forge 1.21.1 \n \n"
|
printf "+ Downloading and installing Forge 1.21.1 \n \n"
|
||||||
wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.0/forge-1.21.1-52.1.0-installer.jar
|
|
||||||
|
|
||||||
mv forge* Forge.jar
|
wget https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.217/neoforge-21.1.217-installer.jar
|
||||||
|
|
||||||
|
mv *neoforge*. NeoForge.jar
|
||||||
|
|
||||||
### Installing server ###
|
### Installing server ###
|
||||||
|
|
||||||
java -Xms512M -Xmx2048M -jar Forge.jar --installServer
|
java -Xms512M -Xmx2048M -jar NeoForge.jar --installServer
|
||||||
|
|
||||||
### RAM configuration ###
|
### RAM configuration ###
|
||||||
|
|
||||||
@ -184,9 +93,9 @@ else
|
|||||||
pritnf "\n \n!!! Sorry I have no idea what are you trying to do :/ Manual intervention will be needed at the end \n"
|
pritnf "\n \n!!! Sorry I have no idea what are you trying to do :/ Manual intervention will be needed at the end \n"
|
||||||
$maxRam="Error"
|
$maxRam="Error"
|
||||||
echo "-Xmx?G # in place of ? put number of RAM you want to set ass maximum"
|
echo "-Xmx?G # in place of ? put number of RAM you want to set ass maximum"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ "$minRam" > "$maxRam" ]]; then
|
if [[ "$minRam" > "$maxRam" ]]; then
|
||||||
echo "-Xms?G # in place of ? put number of RAM you want to se ass minimum"
|
echo "-Xms?G # in place of ? put number of RAM you want to se ass minimum"
|
||||||
elif [[ "$minRam" =~ ("G"|"M") ]]; then
|
elif [[ "$minRam" =~ ("G"|"M") ]]; then
|
||||||
@ -224,31 +133,32 @@ cd data
|
|||||||
7z x Mods.zip -o/opt/minecraft/mods/
|
7z x Mods.zip -o/opt/minecraft/mods/
|
||||||
cd /opt/minecraft/
|
cd /opt/minecraft/
|
||||||
|
|
||||||
# adds mode to help comunicate with VeloProxy
|
# TODO neoforge now
|
||||||
if [[ "$ansVeloProxy" =~ ["y"|"Y"] || -z $ansVeloProxy ]]; then
|
## adds mode to help comunicate with VeloProxy
|
||||||
wget https://cdn.modrinth.com/data/vDyrHl8l/versions/jfiEc2mQ/proxy-compatible-forge-1.1.7.jar
|
#if [[ "$ansVeloProxy" =~ ["y"|"Y"] || -z $ansVeloProxy ]]; then
|
||||||
mv proxy-compatible-forge*.jar /opt/minecraft/mods/
|
# wget https://cdn.modrinth.com/data/vDyrHl8l/versions/jfiEc2mQ/proxy-compatible-forge-1.1.7.jar
|
||||||
|
# mv proxy-compatible-forge*.jar /opt/minecraft/mods/
|
||||||
if [[ "$ansModernFarward" =~ ["y"|"Y"] || -z $ansModernFarward ]]; then
|
#
|
||||||
mkdir /opt/minecraft/config
|
# if [[ "$ansModernFarward" =~ ["y"|"Y"] || -z $ansModernFarward ]]; then
|
||||||
mv data/pcf-common.toml /opt/minecraft/config/ #TODO Research this shit
|
# mkdir /opt/minecraft/config
|
||||||
fi
|
# mv data/pcf-common.toml /opt/minecraft/config/ #TODO Research this shit
|
||||||
fi
|
# fi
|
||||||
|
#fi
|
||||||
# adds aditional mods
|
#
|
||||||
if [[ "$ansSkinRestorer" =~ ["y"|"Y"] || -z $ansSkinRestorer ]]; then
|
## adds aditional mods
|
||||||
wget https://mediafilez.forgecdn.net/files/6897/64/skinrestorer-2.4.3%2B1.21-forge.jar
|
#if [[ "$ansSkinRestorer" =~ ["y"|"Y"] || -z $ansSkinRestorer ]]; then
|
||||||
mv skinrestorer*.jar /opt/minecraft/mods/
|
# wget https://mediafilez.forgecdn.net/files/6897/64/skinrestorer-2.4.3%2B1.21-forge.jar
|
||||||
fi
|
# mv skinrestorer*.jar /opt/minecraft/mods/
|
||||||
|
#fi
|
||||||
if [[ "$ansPlayerSync" =~ ["y"|"Y"] || -z $ansPlayerSync ]]; then
|
#
|
||||||
cd -
|
#if [[ "$ansPlayerSync" =~ ["y"|"Y"] || -z $ansPlayerSync ]]; then
|
||||||
# Not using wget because of castom modification to this mod
|
# cd -
|
||||||
mv data/playersync-1.21.1.jar /opt/minecraft/mods
|
# # Not using wget because of castom modification to this mod
|
||||||
cd /opt/minecarft/
|
# mv data/playersync-1.21.1.jar /opt/minecraft/mods
|
||||||
# TODO what abou configuration of this?
|
# cd /opt/minecarft/
|
||||||
fi
|
# # TODO what abou configuration of this?
|
||||||
|
#fi
|
||||||
|
#
|
||||||
|
|
||||||
### Permisions ###
|
### Permisions ###
|
||||||
printf "\n+ Permision handeling\n"
|
printf "\n+ Permision handeling\n"
|
||||||
@ -260,44 +170,7 @@ mv data/mc-forge.service /etc/systemd/system/
|
|||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
### integration of Maxopoly's instructions on firewall ###
|
|
||||||
|
|
||||||
if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z "$ansFirewallSetup" ]]; then
|
|
||||||
|
|
||||||
printf "+ Executing firewall setup"
|
|
||||||
|
|
||||||
iptables -P INPUT ACCEPT #Clears existing rules
|
|
||||||
|
|
||||||
iptables -A INPUT -i lo -j ACCEPT #Allow loopback
|
|
||||||
|
|
||||||
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #Allow continuing connections
|
|
||||||
|
|
||||||
iptables -A INPUT -p tcp --dport 22 --source $ipList -j ACCEPT #Allow ssh from set network
|
|
||||||
|
|
||||||
iptables -A INPUT -p tcp --dport 25565 -j ACCEPT #Allow MC port
|
|
||||||
|
|
||||||
iptables -L ### Good place to paste a manual check to not lock yourself out
|
|
||||||
|
|
||||||
printf "\n Does it looks right? [Y/n]: "
|
|
||||||
read ansFirewallOK
|
|
||||||
|
|
||||||
if [[ "$ansFirewallOK" =~ ("Y"|"y") || -z "$ansFirewallOK" ]]; then
|
|
||||||
|
|
||||||
iptables -P INPUT DROP #Disallow everythink else
|
|
||||||
|
|
||||||
iptables -P FORWARD DROP #Block all forwarding
|
|
||||||
|
|
||||||
iptables -P OUTPUT ACCEPT #Allow all outgouing
|
|
||||||
|
|
||||||
apt install iptables-persistent -y
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
printf "\nOK it is time for manual configuration"
|
|
||||||
printf "\nAfter you are done ramamber to run 'apt install iptables-persistent' to save your config. System will automaticly remove your work after restart"
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
### Error handeling ###
|
### Error handeling ###
|
||||||
if [[ "$minRam" = "Error" || "$maxRam" = "Error" ]]; then
|
if [[ "$minRam" = "Error" || "$maxRam" = "Error" ]]; then
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user