portforwarding

Test if port open and forwarded using PHP

依然范特西╮ 提交于 2019-11-27 03:59:52
Full Disclosure: There's a similar question here . Is there any way I can test if a particular port is open and forwarded properly using PHP? Specifically, how do I go about using a socket to connect to a given user with a given port? An Example of this is in the 'Custom Port Test' section of WhatsMyIP.org/ports . I'm not sure what you mean by being "forwarded properly", but hopefully this example will do the trick: $host = 'stackoverflow.com'; $ports = array(21, 25, 80, 81, 110, 443, 3306); foreach ($ports as $port) { $connection = @fsockopen($host, $port); if (is_resource($connection)) {

Java Socket port forwarding

匆匆过客 提交于 2019-11-27 03:42:38
问题 I made a networked game in Java using Sockets. It works great, except... only through my LAN. :/ What I want to be able to do is set it up so that I can start the server running on my home computer and send the client code, in an executable jar, to someone else, and have them be able to launch it and connect through the internet. But like... I have no idea how to set up my modem & router for that. :( I have a wireless Clear modem, for which the configuration page looks like this: http:/

How does Skype work without port forwarding?

非 Y 不嫁゛ 提交于 2019-11-27 02:40:39
I am designing a p2p application which works on port 30000. My router is not UPnP so I required to forward a port to router. But Skype a another p2p application works without port forwarding on my pc. When I analyzed it with wireshark I found its using UDP port 48980, 58544. I am using c++. There is a library in python here which does it for Nat PnP routers . Is it possible to programmatically forward port to router irrespective of type of router and operating system . What should be the approach to do it in c++ or any other language. rein Skype works in a very interesting way. From what I've

Vagrant's port forwarding not working [closed]

我是研究僧i 提交于 2019-11-27 02:30:39
I'm running into a small problem at the end of the Getting Started guide for vagrant . I'm working on a CentOS basebox that has Apache2 running (provisioning via Puppet). I've set up port forwarding for web requests using the following line in Vagrantfile : config.vm.forward_port "web", 80, 4567 But when I make requests to that port, they fail. The error reported by Safari is 'Safari can’t open the page “ http://localhost:4567/ ” because the server unexpectedly dropped the connection.' I did a vagrant reload and saw "[default] -- web: 80 => 4567 (adapter 1)" in the scroll, so where should I

Creating a forwarded port within an SSH tunnel

浪尽此生 提交于 2019-11-26 23:20:23
问题 I'm attempting to use SSH.NET to create a tunnel from localhost:3306 to port 3306 on a remote machine: PrivateKeyFile file = new PrivateKeyFile(@" .. path to private key .. "); using (var client = new SshClient(" .. remote server .. ", "ubuntu", file)) { client.Connect(); var port = new ForwardedPortLocal(3306, "localhost", 3306); client.AddForwardedPort(port); port.Start(); // breakpoint set within the code here client.Disconnect(); } When the breakpoint is hit, client.IsConnected is

Fast implementation of a port forward in Java

半世苍凉 提交于 2019-11-26 23:01:21
问题 I have build a simple application that opens a ServerSocket, and on connection, it connects itself to another server socket on a remote machine. To implement port forwarding, I use two threads, one that reads from the local inputstream and streams to the remote sockets outputstream, and vice versa. The implementation feels a bit inperformant, and so I ask you if you know a better implementation strategy, or even have some code lying around to achive this in a performant way. PS: I know I

Forward a servlet request to another server

允我心安 提交于 2019-11-26 20:59:50
问题 Java Servlet API can forward requests to another path within the same server ( identical host:port ). But, forwarding to a different host:port — like proxy do — is another story. I've tried to do that with Jersey Client, adapting the ServletRequest — method, headers, mediatype and body — to a Jersey ClientRequest ( with a different base uri ), making the call, and adapting back the Jersey ClientResponse — method, headers, mediatype and body — to the ServletResponse. Adapting those manually

SSH -L connection successful, but localhost port forwarding not working “channel 3: open failed: connect failed: Connection refused”

我只是一个虾纸丫 提交于 2019-11-26 19:42:57
问题 My lab runs RStudio on a server. A couple weeks ago, from my cousin's house, I successfully ssh'd into the server and pulled up the server-side RStudio through my local Firefox browser. Now when I try to access the server RStudio from home (via my own router), it doesn't work. I need help troubleshooting, and I'm guessing it's some problem on the router. I'm running Mac OSX 10.6.8. No idea what the university server's running, but I don't think it's a server-side problem. Here's how it worked

Access localhost from the internet [closed]

故事扮演 提交于 2019-11-26 18:47:40
问题 I need to forward my localhost for a short period of time for testing purposes. It has to be accessed from the public internet. How can I achieve this? Thanks. 回答1: You go into your router configuration and forward port 80 to the LAN IP of the computer running the web server. Then anyone outside your network (but not you inside the network) can access your site using your WAN IP address (whatismyipcom). 回答2: There are couple of good free service that let you do the same. Ideal for showing

Vagrant's port forwarding not working [closed]

梦想与她 提交于 2019-11-26 17:30:07
问题 I'm running into a small problem at the end of the Getting Started guide for vagrant. I'm working on a CentOS basebox that has Apache2 running (provisioning via Puppet). I've set up port forwarding for web requests using the following line in Vagrantfile : config.vm.forward_port "web", 80, 4567 But when I make requests to that port, they fail. The error reported by Safari is 'Safari can’t open the page “http://localhost:4567/” because the server unexpectedly dropped the connection.' I did a