1
  1. My connection is Modem ROUTER -> MyPC -> Laptop (laptop is connected wireless using hostednetwork from MyPC)
  2. I install SQL Server on both Mypc and laptop
  3. On my modem router I have configured port forwarding 1433 and 1434 to MyPC
  4. My goal is connect on laptop using public IP address.
  5. I check what is my public address from MyPC and laptop but the result is same IP address for both of them. And I try to connect using public IP address but it always connect to MyPc SQL Server.
  6. How to connect to laptop to SQL Server ?
0

1 Answer 1

1

Never mind I have figure out. this exactly what im doing:

  1. my modem Router Public IP is 36.80.250.25 and the Modem Router local ip is 192.168.123.1 and Modem router ip forwarding setting on port 1433 to MyPc (192.168.123.2).
  2. Mypc lan card IP 192.168.123.2 and Mypc wireless Lan card IP 192.168.137.1 and also i open windows 7 firewall to accept incoming SQL server and SQL Brrowser connection.
  3. Laptop IP 192.168.137.2. I set static ip address. and set the sql server listening port to 14330.
  4. So Mypc is act as router, listening sql request on port 1433 and foward the request to port 14330 on the Laptop with this command via cmd.exe:

    netsh interface portproxy add v4tov4 listenport=1433 listenaddress=0.0.0.0 connectport=14330 connectaddress=192.168.137.2 
    
  5. So i test it using SQL Server Management Studio Express and connect to 36.80.250.25 just using IP address and it can connect to laptop SQL sever.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.