Page 33 of 33

Re: Mxserver Tutorial

Posted: Tue Jan 30, 2018 4:14 am
by LKR47
Quick question. I cant run servers at school so one of my buddies said he'd host one so we can mess around on it. I set it all up for him through teamviewer and everything works properly as it should. He doesn't really know any commands so I figured I'd just use packet sender with some of the commands I've set up but change the destination. Every time I send a command though it said it was ignored from the remote (me). I was just wondering if there was another arg I needed to set up or something to be able to control remotely for future ref?

Image

Re: Mxserver Tutorial

Posted: Tue Jan 30, 2018 5:46 am
by Wahlamt
Are you sending the packages remote from an external IP? I'm pretty sure the sim server only accepts packages from localhost.

Re: Mxserver Tutorial

Posted: Tue Jan 30, 2018 6:31 am
by LKR47
Wahlamt wrote:Are you sending the packages remote from an external IP? I'm pretty sure the sim server only accepts packages from localhost.
Yep, was sending the packets from my IP to his. If they only run over localhost then that makes sense because everything was setup up properly like it should. Thanks for the info!
I'm going to write a little script that listens for remote commands and runs them on local host if the proper credentials are supplied maybe through ssh. Could be useful for somebody in the future if they're running a server remotely.

Re: Mxserver Tutorial

Posted: Tue Jan 30, 2018 3:02 pm
by yzmxer608
That would be cool!

I can't remember if I've posted this before or not, but I have a problem on my server that others can't connect to it (contacting server) unless I'm in the server already. Anyone else see this happen before?

Re: Mxserver Tutorial

Posted: Fri Feb 09, 2018 8:26 pm
by Mike733
When I press on the mxserver.exe nothing opens? How can I open it?

Re: Mxserver Tutorial

Posted: Tue Feb 13, 2018 10:48 am
by Wahlamt
Mike733 wrote:When I press on the mxserver.exe nothing opens? How can I open it?
Run "runserver.bat" :)

Re: Mxserver Tutorial

Posted: Sun Apr 22, 2018 3:41 pm
by Wahlamt
I'll leave this here in case anyone wants to set up a server on a Linux system via command line interface.


Re: Mxserver Tutorial

Posted: Sun Apr 22, 2018 3:58 pm
by yzmxer608
Thanks! Added to the first post. :D

Re: Mxserver Tutorial

Posted: Sun Jan 27, 2019 7:38 pm
by Drose45
So I never had this problem on my old pc but when trying to setup my results and I get this

C:\Users\wkit4\Desktop\mxserver>curl -s -F "76.189.11.2:19800" -F "password=reed45" -F "results=<results.txt" http://mxsimulator.com/uploadresults.php
curl: option -F: is badly used here

tried changing the line to "curl "76.189.11.2:19800" "password=reed45" "results=<results.txt" http://mxsimulator.com/uploadresults.php"
but then it fails to find the host

If someone could give me alittle advice id appreciate it

Re: Mxserver Tutorial

Posted: Sun Jun 28, 2020 12:20 pm
by Wahlamt
Make sure that you got this in your server args. Please change "YourPassword" in this file and in the python file below.
--xcmd-password YourPassword
Updated "sendcommands.py" to python 3 after I realized my old one wasn't working (been on a biiiit of a hiatus...). Change the password to the one in your serverargs file and change the port if you got another one.
import socket

MESSAGE = "x" #DO NOT CHANGE THIS. OBLIGATORY X IN THE BEGINNING

UDP_IP = "127.0.0.1" #Assuming you run your server locally as localhost.
UDP_PORT = 19800 #Change to your port, if it isn't 19800
MESSAGE += "YourPassword" #Change this to your password

command = input('Enter the command you wish to execute: ')

MESSAGE += command

print("UDP target IP:", UDP_IP)
print("UDP target port:", UDP_PORT)
print("message:", MESSAGE)

b1 = bytes(MESSAGE, 'utf-8') #Converting to bytes. String not accepted.

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #internet #UDP
sock.sendto(b1, (UDP_IP, UDP_PORT))

Re: Mxserver Tutorial

Posted: Sun Jun 28, 2020 12:21 pm
by Wahlamt
Make sure that you got this in your server args. Please change "YourPassword" in this file and in the python file below.

Code: Select all

--xcmd-password YourPassword
Updated "sendcommands.py" to python 3 after I realized my old one wasn't working (been on a biiiit of a hiatus...). Change the password to the one in your serverargs file and change the port if you got another one.

Code: Select all

import socket

MESSAGE = "x"               #DO NOT CHANGE THIS. OBLIGATORY X IN THE BEGINNING

UDP_IP = "127.0.0.1"        #Assuming you run your server locally as localhost.
UDP_PORT = 19800            #Change to your port, if it isn't 19800
MESSAGE += "YourPassword"     #Change this to your password

command = input('Enter the command you wish to execute: ')

MESSAGE += command

print("UDP target IP:", UDP_IP)
print("UDP target port:", UDP_PORT)
print("message:", MESSAGE)

b1 = bytes(MESSAGE, 'utf-8') #Converting to bytes. String not accepted.

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #internet #UDP
sock.sendto(b1, (UDP_IP, UDP_PORT))

Re: Mxserver Tutorial

Posted: Tue Feb 06, 2024 5:46 am
by Wahlamt
Just FYI for anyone else what might come across the same problem.
Problem: Can't connect to server, it's started and runs on Debian.
Solution: Start the firewall. I started UFW, just starting it made it work... No other firewall seemed to be active.

Code: Select all

sudo systemctl start ufw
sudo systemctl enable ufw
Starting a firewall to let connections in just felt weird.