Port forwarding error

0

I am very new to networks, and I am trying to access a computer which has no public ip from outside its private network.

The layout of the network looks like this:

      PC    <---->          Router          <---->           Modem
(192.168.0.2)    (192.168.0.1 / 192.168.25.11)   (192.168.25.1 / <public_ip>)

The router is a TP-Link TL-WR841N and the modem is a PowerBox PACE V5471.

I have enabled port forwarding in both the modem (port 3750 to 192.168.25.11 port 3750) and the router (port 3750 to 192.168.0.2 port 1433).

In 192.168.0.2, I have a MSSQL server listening to 1433 - and I can connect to it fine within the local network. However, I am not able to do so remotely.

When I try to connect via telnet to <public_ip> and port 3750, which should be routing to 192.168.0.2 and port 1433, I get a Connection refused error.

When I try to see the open ports with nmap from a pc within the local network, here is what I get.

Modem:

nmap -sT <public_ip> 3750

PORT      STATE   SERVICE
3750/tcp  closed  unknown

nmap -sT 192.168.25.1 3750

PORT      STATE    SERVICE
3750/tcp  filtered unknown

Router:

nmap -sT 192.168.25.11 3750

PORT      STATE   SERVICE
3750/tcp  open    unknown

nmap -sT 192.168.0.1 3750

PORT      STATE    SERVICE
3750/tcp  filtered unknown

What am I missing here?

Some useful info:

  • I am trying to connect remotely from a Linux running Ubuntu 14.04
  • I added an exception for port 1433 and for sqlservr.exe in my PC's firewall

Gabriel Ilharco

Posted 2016-01-21T17:45:26.320

Reputation: 101

You can't test the public IPs NAT rules from within the LAN unless your router supports NAT Hairpinning, which is rare for home/SOHO-grade routers. Instead try a port test site like CanYouSeeMe.org or the GRC's Shields Up scanner. – Frank Thomas – 2016-01-21T17:55:47.013

Answers

1

You have a few problems.

The router could eliminate NAT since there really is no reason to run NAT in your private network. You may not need the firewall feature either. If you want two separate networks, just have it route between them, but it will need to know how to get to the Internet, either with a static route or by sharing a routing protocol with the modem. Unless you set this up, the router only knows about the two directly connected networks.

The modem will also need a route to the other network since it knows nothing about it because it is not directly connected, either with a static route or sharing a routing protocol with the router. The modem will also need to be able to hairpin traffic from inside which is destined to a public address inside, else it will end up dropping it.

Ron Maupin

Posted 2016-01-21T17:45:26.320

Reputation: 3 130