2

I need to port forward to the internal port 8080 (TomCat embedded default port number) and my situation is the following:

I do not have a access to my router, my ISP changed it's password, so they offered me a second one that I connected via an Ethernet cable to one of the LAN ports of the first one.

On that second router I reserved a static IP for my machine and port forwarded external port 80 to internal port 8080 (I tested other ports as well).

So I ran nmap on my localhost and got:

[jedson@archlinux]: ~ %> nmap -reason -vvv localhost                                                                                                                                                            [0]
Starting Nmap 7.70 ( https://nmap.org ) at 2019-07-10 19:49 -03
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Initiating Ping Scan at 19:49
Scanning localhost (127.0.0.1) [2 ports]
Completed Ping Scan at 19:49, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 19:49
Completed Parallel DNS resolution of 1 host. at 19:49, 0.01s elapsed
DNS resolution of 1 IPs took 0.01s. Mode: Async [#: 1, OK: 1, NX: 0, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating Connect Scan at 19:49
Scanning localhost (127.0.0.1) [1000 ports]
Discovered open port 8080/tcp on 127.0.0.1
Discovered open port 5432/tcp on 127.0.0.1
Completed Connect Scan at 19:49, 0.02s elapsed (1000 total ports)
Nmap scan report for localhost (127.0.0.1)
Host is up, received conn-refused (0.00011s latency).
Other addresses for localhost (not scanned): ::1
Scanned at 2019-07-10 19:49:35 -03 for 0s
Not shown: 998 closed ports
Reason: 998 conn-refused
PORT     STATE SERVICE    REASON
5432/tcp open  postgresql syn-ack
8080/tcp open  http-proxy syn-ack

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds

The internal port 8080 is open as it should.

But, when I use my IP and check for the open ports I get:

[jedson@archlinux]: ~ %> nmap -reason -vvv X.X.X.X
Starting Nmap 7.70 ( https://nmap.org ) at 2019-07-10 19:56 -03
Initiating Ping Scan at 19:56
Scanning X.X.X.X [2 ports]
Completed Ping Scan at 19:56, 0.01s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 19:56
Completed Parallel DNS resolution of 1 host. at 19:56, 0.04s elapsed
DNS resolution of 1 IPs took 0.04s. Mode: Async [#: 1, OK: 1, NX: 0, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating Connect Scan at 19:56
Scanning X-X-X-X.cgnat.clickinternetfoz.com.br (X.X.X.X) [1000 ports]
Discovered open port 2222/tcp on X.X.X.X
Discovered open port 2000/tcp on X.X.X.X
Completed Connect Scan at 19:56, 0.19s elapsed (1000 total ports)
Nmap scan report for X-X-X-X.cgnat.clickinternetfoz.com.br (X.X.X.X)
Host is up, received conn-refused (0.017s latency).
Scanned at 2019-07-10 19:56:03 -03 for 0s
Not shown: 998 closed ports
Reason: 998 conn-refused
PORT     STATE SERVICE      REASON
2000/tcp open  cisco-sccp   syn-ack
2222/tcp open  EtherNetIP-1 syn-ack

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.30 seconds

(Where all X.X.X.X are instances of my IP address)

Only ports 2000 and 2222 appear. Also, ClickInternet Foz is my ISP, so I figure those are their open ports.

But still, I would like to know if there's any hope for me in fixing it, if it's a trivial mistake or if I should try another way.

Routers model:

First: TL-WR840N

Second: TL-WR741N

2 Answers 2

0

But still, I would like to know if there's any hope for me in fixing it, if it's a trivial mistake or if I should try another way.

In cases like this, you can often use a third party to help get around these kinds of issues through reverse SSH tunnels or similar (e.g. with OpenVPN). While not necessarily guaranteed to work, you should look at:

And other related programs and services. You can theoretically run this kind of setup yourself, but that typically requires setting up a server outside your network manually.

None of these solutions may be ideal, but they are likely the only way to access your server from outside your network currently.

1

Disclaimer: "router" and "modem" are interchangeable in my answer as you referred to the modem as a router.

If you dont have access to your first router I'm afraid you're S.O.L.

You will need to enable either bridged mode or port forwarding on your first router. But then you will run into the double NAT issue.

In this case, the public/private network boundary doesn't exist on your router -- it's on the other device, which means that both the WAN and LAN sides of your router are private networks. The upshot of this is that any UPnP and/or port forwarding you enable on your router is for naught, because incoming remote access requests never make it that far -- they arrive at the public IP address on the other device, where they're promptly discarded.

If you reset router #1 to factory defaults the password should reset to "password" or whatever it says on the box.

Can you unplug the first router and use the second router as your one and only?

If not, you will have to contact your ISP and tell them to give you the password. Depending on your country, I'm not sure they're legally allowed to lock you out.

6
  • >Can you unplug the first router and use the second router as your one and only? No, if I do so I will have no internet access (and they will charge me to "fix" it). >they're legally allowed to lock you out. I think they are, I don't think they will. Thank you for the response, I was wondering how bad was my situation, and now I know. Jul 11, 2019 at 0:19
  • Have you tried to reset your first modem? It should only get rid of settings you have configured in the past, as well as the password the ISP set. You should remain connected to the network after a reset. If you feel I answered your question, I'd appreciate you marking it as answered.
    – aa2397
    Jul 11, 2019 at 0:22
  • >Have you tried to reset your first modem? No, but I tried using only the second one by connecting the WAN cable to it directly. No luck, the connection to the ISP is via PPPoE (over fiber cable), to configure it I need an(other) user and password, which they didn't gave me. Anyway, thanks for the help. Jul 11, 2019 at 0:34
  • Another thing I forgot to mention... They enabled DMZ on one of the internal IPs. Is there a way to use it? Jul 11, 2019 at 0:48
  • @JedsonGabriel Unless you know the configuration and you know where it points to, you need the password.
    – aa2397
    Jul 11, 2019 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .