Arduino Web Server problem with Port Forward

Hello, I have a web server code running on my Arduino Uno with an Ethernet shield. It works fine on the local network, but when I try to access it from my mobile data, it doesn't work. I suspect that port forwarding is the issue because when I check my port, I can't see any open ports. I've configured the router settings, DHCP, and port forwarding, but it's still not working. I have a TP-Link router connected after my Huawei modem. I'm not the owner of the ISP, as I'm renting, and I can't contact the provider. This is crucial for my project. I've read various posts with similar problems but still can't solve mine. I want a solution to access the Arduino either through port forwarding or a different method.
I have different arduino projects that i want to implement it into a web page with analog reads, digital input, home automation, simple relay turn on or off. etc.
Some ideas will be good, thank you

#include <Ethernet.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x1E, 0xA6 };
EthernetServer server(6567);

// Conținutul fișierului de autorizare
const char authContent[] = "Congrats! You have successfully verified your domain.";
void setup() {
  Serial.begin(9600);

  // Adresa MAC
  byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x1E, 0xA6 };
  
  // Adresa IP statică
  IPAddress ip(xxx,xxx,0,178);

  Ethernet.begin(mac, ip);
  server.begin();

  Serial.println("Serverul web a fost pornit!");
  Serial.print("Adresa MAC: ");
  for (int i = 0; i < 6; ++i) {
    Serial.print(mac[i], HEX);
    if (i < 5) Serial.print(':');
  }
  Serial.println();

  // Afișează adresa IP în Serial Monitor
  Serial.print("Adresa IP: ");
  Serial.println(ip);

  Serial.println("Serverul web a fost pornit!");
}


void loop() {
  EthernetClient client = server.available();
  
  if (client) {
    Serial.println("Client conectat");

    while (client.connected()) {
      if (client.available()) {
        // Declară variabila 'request' și atribuie-i valoarea citită din client
        String request = client.readStringUntil('\r');
        Serial.println(request);

if (request.indexOf("/") != -1) {
  Serial.println("Cerere pentru pagina principala.");

  // Răspuns HTML simplu
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/html");
  client.println("Connection: close");
  client.println();
  client.println("<html><body><h1>Salut de la Arduino Web Server!</h1></body></html>");
}

        else if (request.indexOf("/.well-known/pki-validation/") != -1) {
          // Tratează cererea pentru .well-known/pki-validation/
          Serial.println("Cerere pentru .well-known/pki-validation/");
          sendAuthorizationFile(client);
        }
        else {
          client.println("HTTP/1.1 404 Not Found");
          client.println("Content-Type: text/plain");
          client.println("Connection: close");
          client.println();
        }

        break;
      }
    }

    client.stop();
    Serial.println("Client deconectat");
  }
}


void sendAuthorizationFile(EthernetClient &client) {
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/plain");
  client.println("Connection: close");
  client.println();
  client.print(authContent);
}

i tried with noip but still nothing
IPAddress ip(xxx,xxx,0,178);

6567 xxx.xxx.0.178 6567 TCP or UDP Enabled

arduino4.ddns.net
xxx.xxx.100.2:6567 (router ip)

i tried with different ips (my laptop, arduino, router, modem EVERITHING@@@!!!!)
Thank you for your time

What exactly is the meaning of "doesn't work"? You get the TCP connection but no response, or you can't connect at all? How are you testing it? Based on your description and code I suppose you open your smartphone browser (while connected to your mobile network only and not to your WiFi, right?) and try opening the address "http://arduino4.ddns.net:6567", am I right?

Exactly. I get on mobile data in web browser of the phone, connexion expired.

Do you mean that your own router is behind another router that actually provided the connection to the internet? If so then you need port forwarding on that router, but you can't do that because doing so would deprive the other tenants of access to that port

If that's not what you meant please clarify.

Is the Hwawei modem also a router? Or is it configured as bridge with the outside Internet IP address available to the LAN (inside) port?

I have a Huawei modem which I can't access the interface, but it provides Wi-Fi and LAN internet. Connected to LAN1 on the modem, I have a TP-Link device for which I can access the settings.

OK, well, if the Huawei is doing LAN and WiFi then it is a router. So the LAN1 interface, unless you can somehow convince the ISP to configure it as a WAN bridge or DMZ, will need to forward to your TP-Link, which would then have to forward to your device.

So without ISP cooperation or maybe figuring out how to find your way into the modem's interface, like figuring out the default gateway and whatever the admin password is set to, you're outta luck.

what if i do this ESP8266 + Arduino + database
can i remote acces it without making any port forwarding?

Yes but, the range will be very short. I do something similar and the range is about 20 feet.

i want to acces it through database and send signal to arduino through wifi. i want it to remote accces the arduino

i think you could extend the range by connecting a wireless access point to the Ethernet port. I am not sure but with the right antennas you might get over a hundred feet.

Not sure of what you mean by accessing it "through database". I have many systems that have remote access. Some local access, some through the internet. Have you tried just leaving it at port 80 without port forwarding, connected directly to the modem?

Another idea is to do it through remote desktop. If you can share your desktop over the internet, although your isp may be blocking that port too, you can have that machine connected locally. Also google remote desktop work very well and is reliable.

Also what does the wan port on the Huawei device connect to? You can connect your tplink device to that device which is the modem. Do you have fiber or dsl service? in either case there is probably a modem between the Huawei device and the isp.

Ok, so, that Huawei is not just a modem, but it's a modem-router, and that's where the "port forwarding" must reside. Most ISPs allow the users to define their own port forwarding rules, but you're the only one who can tell looking at the modem-router configuration, if any. If you don't have any access at all to your router due to some ISP restrictions, I'm afraid you can't do anything about that. If you have some kinda limited access, usually port forwarding rules are allowed, but you need to check the router manual and/or ask ISP support.

Ok, you can "access the settings" (doing what exactly?), but "TP-Link" is the manufacturer and a "TP-Link device" is like saying just "I have a Toyota (e.g. does your Toyota is a Prius, a Camry, a Supra, and is it gas, diesel, hybryd, what?) and I can access the engine": if you don't specify what model and what did you do with the settings we can tell you absolutely nothing.

i mean i can port forward on him (TP-Link) but you are saying that it is not enough just on TP link and i must do it on Huawei too. Its no solve for me if this is the case.

Yes, the Huawei (modem+router) must also do forwarding.

And for the record, even if you can set up forwarding through two routers it may not work very well. For reliability it at least helps to make the WAN side of the second router (i.e. your TP-Link) a static IP address.

Basically what's happening here is you're getting the very first few days of a "Networking 101" class. But not having full control of all your equipment is a problem.

The only other way around this stuff is to have an outside proxy of some sort.

A good example of what I'm talking about is Teamviewer software...

You start the software on two PCs in two different places. Neither place has a router set up to do forwarding. What happens is that you have an almost web browser -like conversation between the PC and a cloud service on one side, and a similar conversation on the other side, and the cloud service acts as a proxy or intermediary for the conversation between the two PCs.

I'm not sure you're going to find something like this so easily but if you really want to wind up learning a lot the hard way you can set up a database and a web front-end on Amazon Web Services or similar, then have the Arduino just update the AWS database.

Well, everything goes in that direction, but you still miss a thing: what is that TP-Link device? Is it so hard to read the device model and write it down here, together with a simple drawing of you network topology (e.g. how the Tp-Link is connected to the router?)?

You said you added a port forwarding on that TP-Link, so it looks like to be a router (also): but do you really need another router on your local network? Do you have separate IP networks to be connected together? I suppose not, so even if that "mysterious" TP-Link device has router capabilities you can completely ignore it, and focus on your ISP modem/router.
And the main question is now: does it allow you to create port forwarding rules or not?