Hello everyone
I'm following a simple guide on the internet about how to create a local server for a specific game on a virtual machine
I did all the steps without problems, but when I test, I can't connect to the server
Someone told me it's happening because my virtual machine IP is 192.168.0.X and it should be 192.168.1.X
I tried to set a static IP, but this didn't work
My question is: How do I make it work using 192.168.0.X IP?
Thanks in advance.
This is the guide I'm following:
Step 1 : Create the linux and prepare it
1) Create Virtual machine on Virtual box with this setup
- core : 2
- ram : 4 gb
- disk space : 50Gb
2) Install Ubuntu 20.04.4
- You must install SSH
3) Execute the following commands
4) Enable root login over SSH using
5) Then restart SSH service
6) Then setup database
Step 2 : Setup the postgres database
1) Change your user to postgres
2) Allow the login from external
3) Update postgresql.conf
4) Restart postgres
Step 3 : Setup the database
1) Change to postgres user
2) Then:
3) Edit the worlds.sql following your local IP
4) Then:
5) Update serverstatus.sq l following your IP
6) Then:
Step 4 : Launch the server
I'm following a simple guide on the internet about how to create a local server for a specific game on a virtual machine
I did all the steps without problems, but when I test, I can't connect to the server
Someone told me it's happening because my virtual machine IP is 192.168.0.X and it should be 192.168.1.X
I tried to set a static IP, but this didn't work
My question is: How do I make it work using 192.168.0.X IP?
Thanks in advance.
This is the guide I'm following:
Step 1 : Create the linux and prepare it
1) Create Virtual machine on Virtual box with this setup
- core : 2
- ram : 4 gb
- disk space : 50Gb
2) Install Ubuntu 20.04.4
- You must install SSH
3) Execute the following commands
Code:
- sudo apt update - sudo apt upgrade - sudo apt install nano - sudo apt install net-tools - sudo apt install screen - sudo apt install unzip
Code:
- nano /etc/ssh/sshd_config - Change or add line: PermitRootLogin yes
- service ssh restart6) Then setup database
- sudo apt install postgresqlStep 2 : Setup the postgres database
1) Change your user to postgres
Code:
- su postgres - Then write: psql ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'test';
Code:
- cd /etc/postgresql/12/main - Then: sudo su - Then: nano pg_hba.conf - Change this: host all all 127.0.0.1/32 md5 - To this: host all all 0.0.0.0/0 md5
Code:
- nano postgresql.conf - Change this: #listen_addresses = 'localhost' # what IP address(es) to listen on; - To this: listen_addresses = '*' # what IP address(es) to listen on;
- service postgres restartStep 3 : Setup the database
1) Change to postgres user
Code:
- su postgres - Copy your database.out to the VM in the folder /home
Code:
- psql -f database.out - Copy your worlds.sql to the VM in the folder /home
Code:
- INSERT INTO "public"."worlds" VALUES (1010, 'CHANNEL_NAME', 'YOUR_IP', 5712, 0, 150, 1, '002.003.05.67', 1, 0, 1, 100);
Code:
- psql -d fnaccount -f worlds.sql - Copy your serverstatus.sql to the VM in the folder /home
Code:
- INSERT INTO "public"."serverstatus" VALUES (1010, 'WorldServer', 'YOUR_IP', 5712, '127.0.0.1', 5712, 0); INSERT INTO "public"."serverstatus" VALUES (1011, 'ZoneServer', 'YOUR_IP', 10166, '127.0.0.1', 10166, 0); INSERT INTO "public"."serverstatus" VALUES (-2, 'MissionServer', 'none', -1, '127.0.0.1', 7654, 1628266391);
- psql -d fndb1 -f serverstatus.sq lStep 4 : Launch the server
Code:
- Copy paste server folder in /home of your VM - sudo su - sudo chmod 777 /home/server -R ** - Change all password database in files - Start the server with: ./start
Comment