What are some ways to connect to one computer from another other than using VPN or a Static IP? Let's say, for example, one computer is hosting a web service and another computer that's not part of the network wants to call that web service. Would it be possible without a static IP or VPN?

Dani AI

Generated

Short answer: yes — you can make a machine behind NAT reachable without a static IP or an IP-level VPN. The common pattern is to have the host (the machine behind the NAT/firewall) initiate an outbound connection to a publicly reachable broker or relay; external clients then talk to that broker. That avoids inbound-only NAT rules and the need to change the remote network's IP plan.

Building on points from , , and , here are practical approaches that were not listed above: persistent reverse tunnels (host opens an outbound SSH tunnel to a public VPS and forwards a port back), ephemeral tunneling services (create an outbound TLS tunnel and return a public URL), peer-to-peer NAT traversal (STUN/TURN/WebRTC for browser or RTC-capable apps), and an application-level relay (host pushes data to a cloud endpoint or message queue and the client pulls it). If the router allows, automatic port mapping (UPnP) is another option but is often unreliable or disabled by policy.

Minimal, implementable example (reverse SSH to a cheap VPS):

# on the host behind NAT: forward host:80 to vps:8080
ssh -N -R 0.0.0.0:8080:localhost:80 user@vps.example.com

# keep the tunnel persistent with autossh
autossh -M 0 -f -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" \
  -R 0.0.0.0:8080:localhost:80 user@vps.example.com

Notes: enable GatewayPorts on the VPS sshd if you need the remote port bound to the public interface; use key-based auth; open only the required port on the VPS firewall; optionally run a reverse proxy on the VPS for TLS and routing.

Security and troubleshooting tips: always protect the exposed endpoint with TLS and authentication, restrict source IPs if possible, run the tunnel under a non-root account, and monitor/log failed attempts. If outbound connections are blocked by corporate policy you will need administrative changes or a managed brokered service.

Recommended Answers

All 4 Replies

Do you have access to the destination computer? I have used and like teamviewer www.teamviewer.com.

It depends on how you want to connect to the computer and the relationship of your network to that of the computer. If you have an access point to that computer you can use Terminal service to connect by typing mstsc on run dialog box and imputing the ip address of the computer to the terminal window. If you do not have access point and you still want to connect to the computer, you can do it over the internet using 'team viewer', but both computer must be connected to the internet for you to use that.
Then if you just wand to connect to the computer just to access the resource it host on your local system you can use routing and remote access service or even ftp serve to connect.

If you are hosting a web server on the one computer you want to access and you don't have a static IP address you could use a dynamic DNS service such as dyndns.org.

Well that depends as e'one say. You can use some other types of connections. However it depends on:
Service type and Port - To access web services you have to use an interface program which provides www services via port 80 and/or 80xx. If they allow the service through other ways you have to know those services and ports.
However Pc to Pc connection is quite easy with tools such as N-Central, logmein, RAdmin, Crossloop, Teamviewer. These tools will work only if the ports are allowed to be opened by perimeter firewalls.
If you have to connect to a enterprise network, you can use Terminal Services and Remote Desktop features. You can use commandline tools or tools with graphical interface.
Services that you can use:
For files transfers only, you can use ftp, tftp or sftp.
For voice and video transfers only, you can use RTP of the service if available
You can use Telnet to manage stuff (You have to securely configure it since its highly vulnerable. Its not recommended to use telnet).
You could use hyperterminal which is available in Windows.

Type of the Gateway - If gateways do not allow certain types of services, you will not be able to use them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.