I have a problem that has been breaking my head for over a week!
I have a Flash game that works under Python.
The game works fine from localhost, but doesn't work if someone tries to play it from another computer. You can access mysql, login into the server, but can't play.
When played from localhost the firestarter first gets an entry from 127.0.0.1:80 port, unknown service.
Then when the game starts the entry change to 127.0.0.1:2001, unknown service.
When other computer try to play, get a entry in 80 port, and stops there.
Below are some file excerpts.
config.py
mysql_host = 'localhost'
mysql_user = 'root'
mysql_pass = 'pass'
root_host = 'localhost'
policy_line = '<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/><allow-access-from domain="*" to-ports="843,2001,3001,4001,5001,6001,7001,8001,9001,9002,9092" />
</cross-domain-policy>'
init.py
from policy_server import PolicyFactory
from game_server import gameFactory
from twisted.internet import reactor
def main():
print 'Server Started...'
reactor.listenTCP(843, PolicyFactory())
GameServer = GameFactory('localhost', 'pt_br')
reactor.listenTCP(1024, gameServer)
reactor.listenTCP(2001, gameServer)
reactor.listenTCP(3001, gameServer)
reactor.listenTCP(4001, gameServer)
reactor.listenTCP(6001, gameServer)
reactor.listenTCP(7001, gameServer)
reactor.listenTCP(8001, gameServer)
reactor.listenTCP(9001, gameServer)
reactor.listenTCP(9002, gameServer)
reactor.listenTCP(9092, gameServer)
reactor.run()
if (__name__ == '__main__'):
main()
crossdomain.xml
<cross-domain-policy><site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="localhost" to-ports="843,1024,2001,3001,4001,5001,6001,7001,8001,9001,9002,9092"/>
<allow-access-from domain="http://127.0.0.1" to-ports="843,1024,2001,3001,4001,5001,6001,7001,8001,9001,9002,9092"/>
</cross-domain-policy>