我试图让我的路由器转发对我的noipdynamicDNS的请求到我的本地计算机,我有一个nodjs运行,等待14555端口上的请求。
我有noip dns设置,以便在本地运行的netcat不会收到任何对14555端口的调用(即使用浏览器):
ncat -l -n -v -v -k -p 14555 Ncat: Version 5.59BETA1 ( http://nmap.org/ncat ) Ncat: Listening on 0.0.0.0:14555 Ncat: Connection from xxx.xxx.xxx.xxx:56409. GET /socket.io/?EIO=3&transport=polling&t=1430939580269-4 HTTP/1.1 Host: someDomain.ddns.net:14555 Connection: keep-alive ... NCAT DEBUG: Closing connection. Ncat: Connection from 84.167.116.141:56411.
但是,虽然通话似乎通过了一切,并到达我的机器,节点不听它。 它没有收到任何东西:
HTTP server listening at 0.0.0.0:14555/
我的接收服务器是这样configuration的:
var self = this; // Start the server this.httpServer = http.createServer(function(req, res){ // Send HTML headers and message res.writeHead(200,{ 'Content-Type': 'text/html' }); res.end('<h1>Hello Socket Lover!</h1>'); }); //Listen on the port for HTTP requests this.httpServer.listen(cfg.port, '0.0.0.0'); console.log('HTTP server listening at 0.0.0.0:' + cfg.port + '/');