ballou 10 Posted January 1, 2012 Since i updated the OA servers to 1.60 its showing a yellow question mark icon on the server list, looking down the list there are a few servers also showing this as well, people can get in and play, is there anyway that i can turn this green? Share this post Link to post Share on other sites
eddieck 10 Posted January 1, 2012 CIT ticket: http://dev-heaven.net/issues/27265 I'll update that ticket in a minute with a working mod hash. Python NFQUEUE script to replace the broken hash (Linux only, of course): #!/usr/bin/env python # ArmA 2: OA GameSpy query responder import sys import os import socket import nfqueue import string def handle_pkt(dummy, payload): pkt = payload.get_data() pkt_len = len(pkt) if pkt_len >= 29: data = string.replace( pkt[28:], 'da39a3ee5e6b4b0d3255bfef95601890afd80709', 'c7fec358b415d6c61ea65ff9e2b2dede8afdc1e6' ) pkt = "%s\x00\x00%s" % (pkt[:26], data) return payload.set_verdict_modified(nfqueue.NF_ACCEPT, pkt, pkt_len) payload.set_verdict(nfqueue.NF_ACCEPT) if __name__ == '__main__': if len(sys.argv) != 2: sys.exit("Usage: %s <queue number>" % (sys.argv[0])) try: queue_num = int(sys.argv[1]) except ValueError: sys.exit("Invalid queue number") q = nfqueue.queue() q.open() # Required for some reason q.unbind(socket.AF_INET) q.bind(socket.AF_INET) q.set_callback(handle_pkt) q.create_queue(queue_num) q.try_run() Share this post Link to post Share on other sites
NeoArmageddon 958 Posted January 1, 2012 Hey eddieck, nice script, but took me 2 hours to get it running. It works, but the scripts shuts down itself after approx 60min. I am using Debian 5 (tried the script with and without screen). But maybe its an error related to python (I am not familiar with python). Any ideas? Share this post Link to post Share on other sites
eddieck 10 Posted January 2, 2012 It works, but the scripts shuts down itself after approx 60min. I am using Debian 5 (tried the script with and without screen). But maybe its an error related to python (I am not familiar with python). Any ideas? Strange. Can you post the error here? I've been running that script (or a variant of it with the old mod hash) for several months without a single crash. Also, you'll need an iptables rule (should have posted that earlier) to make this work: iptables -A OUTPUT -m udp -p udp --sport 2302 -m string --string "da39a3ee5e6b4b0d3255bfef95601890afd80709" --algo bm --to 65535 -j NFQUEUE --queue-num 1 Not having that should not cause any crashes, however. Share this post Link to post Share on other sites
ballou 10 Posted January 2, 2012 thanks for the help, running windows 7 on the server box Share this post Link to post Share on other sites
NeoArmageddon 958 Posted January 2, 2012 (edited) The script works fine, as long as it runs. My ipTables-entry: -A OUTPUT -p udp -m udp -m multiport --ports 2302,2303,2304,2305 -j NFQUEUE (The queue seems to have ID 0 if there is no --queue-num). The script don't throw any errors (in shell). I will try your iptable rule now. How are you executing your py script? Simply in shell? Edited January 2, 2012 by NeoArmageddon Share this post Link to post Share on other sites
eddieck 10 Posted January 2, 2012 How are you executing your py script? Simply in shell? At the moment, yes. I also have an init script that I've used in the past. I wouldn't recommend that iptables rule. It means that a string replace is going to be performed on every single outbound packet from those ports. It should be more efficient to use the string match rule and only pass on the necessary traffic to the script. What distro are you using BTW? I'm on Ubuntu 11.10 x64 with everything up-to-date. Might be worth comparing versions of certain things. Share this post Link to post Share on other sites
NeoArmageddon 958 Posted January 2, 2012 Debian 5.0 Lenny. Webmin say everything is up-to-date. Started the script with your iptable and everything is still running (but arma server is idle in mission selection). Maybe stringchecking every paket from Arma caused some kind of queue overflow. I will investigate now (I will play Arma now^^) Share this post Link to post Share on other sites