I started wondering how many lines of code will it take to run the server with python and twisted and here it is.
from twisted.internet import reactor
from twisted.internet.protocol import Factory, Protocol
def dataReceived(self, data):
self.protocol = PolicySocketProtocol;
if __name__ == '__main__':
reactor.listenTCP(843, PolicyFactory(), interface="127.0.0.1")
The server is running on localhost to change this simply modify "127.0.0.1" to your host name. It's allowing to access on all ports and all domains what is not recommended for known reasons :)