how to access my pc on wan using public ip

Steps to Access Your PC via Public IP

1. Find Your Public IP

  • On the PC → open a browser → search “What is my IP”.
  • Example: 123.45.67.89.

2. Enable Remote Access on Your PC

If using Windows (Remote Desktop):

  1. Open Settings → System → Remote Desktop → Enable Remote Desktop.
  2. Note your PC username and password.

If using Linux:

  • Enable SSH (sudo systemctl enable ssh && sudo systemctl start ssh).
  • Or install a VNC server (tightvncserver, x11vnc, etc.).

3. Configure Your Router (Port Forwarding)

  • Log in to your router (usually 192.168.0.1 or 192.168.1.1).
  • Find Port Forwarding / Virtual Server.
  • Forward the correct port:
    • RDP (Windows Remote Desktop): TCP 3389 → your PC’s local IP.
    • SSH (Linux/Mac): TCP 22 → your PC’s local IP.
    • VNC: TCP 5900.

Example:
Forward TCP 3389192.168.1.100.


4. Access From Outside

  • From another PC/phone (outside your home network):
    • For Windows Remote Desktop:
      • Open “Remote Desktop Connection” → enter 123.45.67.89:3389.
    • For SSH (Linux/Mac): ssh user@123.45.67.89
    • For VNC: use a VNC client → connect to 123.45.67.89:5900.

5. Secure It

  • Don’t expose RDP/SSH directly on default ports → change to custom port (e.g., 2222 instead of 22).
  • Use a strong password.



Leave a Reply