Mxserver Tutorial

Post anything about MX Simulator here. Please. I'm begging you.
LKR47
Posts: 893
Joined: Fri Jan 18, 2013 4:26 am
Team: LCQ Studios
Location: McHenry, Illinois
Contact:

Re: Mxserver Tutorial

Post 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
Image
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Mxserver Tutorial

Post by Wahlamt »

Are you sending the packages remote from an external IP? I'm pretty sure the sim server only accepts packages from localhost.
LKR47
Posts: 893
Joined: Fri Jan 18, 2013 4:26 am
Team: LCQ Studios
Location: McHenry, Illinois
Contact:

Re: Mxserver Tutorial

Post 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.
Image
yzmxer608
Posts: 15352
Joined: Mon Dec 29, 2008 4:30 am
Team: SYS
Location: Wisconsin, U.S.A

Re: Mxserver Tutorial

Post 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?
TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.
Mike733
Posts: 44
Joined: Tue Jan 09, 2018 10:14 am
Team: Privateer

Re: Mxserver Tutorial

Post by Mike733 »

When I press on the mxserver.exe nothing opens? How can I open it?
Image
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Mxserver Tutorial

Post by Wahlamt »

Mike733 wrote:When I press on the mxserver.exe nothing opens? How can I open it?
Run "runserver.bat" :)
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Mxserver Tutorial

Post by Wahlamt »

I'll leave this here in case anyone wants to set up a server on a Linux system via command line interface.

yzmxer608
Posts: 15352
Joined: Mon Dec 29, 2008 4:30 am
Team: SYS
Location: Wisconsin, U.S.A

Re: Mxserver Tutorial

Post by yzmxer608 »

Thanks! Added to the first post. :D
TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.
Drose45
Posts: 1
Joined: Thu Jan 10, 2019 4:50 am
Team: Privateer

Re: Mxserver Tutorial

Post 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
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Mxserver Tutorial

Post 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))
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Mxserver Tutorial

Post 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))
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Mxserver Tutorial

Post 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.
Post Reply