ready for test

This commit is contained in:
godot 2024-07-26 18:31:36 +02:00
parent f19452ddd3
commit 03b0ee5c7f
3 changed files with 31 additions and 25 deletions

View File

@ -1,19 +1,20 @@
## The Plan
- [x] walkthruw
- [x] prototype
- [ ] clean it
- [ ] script it
- [*] clean it
- [*] script it
- [x] addons for Forge
- [ ] test that bitch
## To DO!
- [*] Firewall shinanigns
- [*] Proxmox admin acces in firewall
- [x] Auto add plugins
- [*] SystemD service
- [ ] Config of velocity.toml
- [ ] IP
- [ *] Config of velocity.toml
- [*] IP
- [*] Tailscale
- [ ] Comments of what is doing what
- [*] Comments of what is doing what
## To learn
- [x] What content of start.sh means
@ -21,4 +22,4 @@
- [ ] Different types of forwarding
- [ ] SkinRestorer???
- [ ] DinMap
- [ ] In their docs they have pages
- [*] In their docs they have pages

View File

@ -6,7 +6,7 @@ bind = "0.0.0.0:25577"
# What should be the MOTD? This gets displayed when the player adds your server to
# their server list. Only MiniMessage format is accepted.
motd = "<#09add3>A Velocity Server"
motd = "<#e609ab>0-life perfect server"
# What should we display for the maximum number of players? (Velocity does not support a cap
# on the number of players online.)
@ -72,7 +72,7 @@ enable-player-address-logging = true
[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP address of the server to connect to.
main = "192.168.0.119:25565"
main = "192.168.0.21:25565"
# factions = "127.0.0.1:30067"
# minigames = "127.0.0.1:30068"

View File

@ -24,11 +24,11 @@ elif [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then
if [[ "$sshBlockRange" =~ ("n"|"N") ]]; then
printf "If you want input your own IP range [N/range]\n"
printf "If you want, input your own IP range [N/range]\n"
read sshRange
if [[ "$sshRange" =~ ("n"|"N") || -z $sshRange ]]; then
printf "+ Making your SSH connections wide and open. Think about it. /n"
printf "+ Making your SSH connections wide and open. After we are done, do somethink with it. /n"
ipList="*"
else
printf "+ Accepting SSH connections only on these ip's: $sshRange\n"
@ -42,8 +42,12 @@ fi
sleep 2
printf "+ Updating your base system\n"
apt update && apt upgrade -y
printf "+ Installing depandencies \n"
apt install openjdk-17-jre-headless screen
@ -53,6 +57,7 @@ fi
### User managment
printf "+ creating group and user for proxy \n"
groupadd velocity
useradd --system --shell /usr/sbin/nologin --home /opt/velocity -g velocity velocity
@ -60,6 +65,7 @@ useradd --system --shell /usr/sbin/nologin --home /opt/velocity -g velocity velo
### File structure
printf "+ creating file structure in /opt/velocity/ \n"
mkdir /opt/velocity
mv data/velocity*.jar start.sh /opt/velocity/
@ -74,17 +80,18 @@ mv data/forwarding.secret /opt/velocity/
### Permisions
printf "+ handeling permisions \n"
chown -R velocity:velocity /opt/velocity/
### SystemD service ### needs update
### SystemD service
printf "+ Preparign systemD service\n"
mv data/mc-forge.service /etc/systemd/system/
mv data/mc-velocity.service /etc/systemd/system/
systemctl daemon-reload
### integration of Maxopoly's instructions on firewall ### needs update
### integration of Maxopoly's instructions on firewall
if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z "$ansFirewallSetup" ]]; then
@ -102,13 +109,13 @@ if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z "$ansFirewallSetup" ]]; then
### Wide and open
iiptables -A INPUT -p tcp --dport 22 j ACCEPT
iiptables -A INPUT -p tcp --dport 22 j ACCEPT # Allow wide and open ssh on port 22
elif [[! "$ipList" -z ]]; then
### Manual IP range
iptables -A INPUT -p tcp --dport 22 --source $ipList -j ACCEPT
iptables -A INPUT -p tcp --dport 22 --source $ipList -j ACCEPT # Allow limited ssh port 22
fi
iptables -L ### Good place to paste a manual check to not lock yourself out
@ -134,7 +141,7 @@ if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z "$ansFirewallSetup" ]]; then
fi
fi
### tailsclae install ###
### tailsclae install
printf "Do you want to install Tailscale now? [Y/n]: \n"
read ansTail
@ -146,26 +153,24 @@ if [[ "$ansTail" =~ ("y"|"Y") || -z $ansTail ]]; then
if [[ "$sshBlockRange" =~ ("y"|"Y") || -z $sshBlockRange ]]; then
tailscale up --ssh
else
tailscale up
fi
fi
### Start service ### needs update
### Start service
printf "Do you want to start server right now? [Y/n]: \n"
printf "Do you want to start velocity proxy right now? [Y/n]: \n"
read startServer
if [[ "$startServer" =~ ("y"|"Y") || -z $startServer ]]; then
systemctl start mc-forge.serice
systemctl start mc-velocity.serice
fi
systemctl enable mc-forge
systemctl enable mc-velocity
### needs update
printf "\nsystemctl status mc-forge"
printf "\n Everythink is now set up. It is good idea to check these:"
printf "\n systemctl status mc-velocity"
printf "\n su velocity -s /bin/bash"