0

I am using a netis WF2419E router. My server computer is on 192.168.1.4 and I have set up virtual servers in the router to forward external port 80-80 to internal port 80-80 for IP address 192.168.1.4 (all protocols).

When I go to 192.168.1.4 on a browser using my PC (which is connected to the same router), I can see my server's web page just fine. However, when I go to my public IP address, it does not work.

I used https://canyouseeme.org/ and it says, Error: I could not see your service on x.x.x.x on port (80) (of course, it shows my actual IP in place of x.x.x.x).

I tried ping testing my IP with https://www.site24x7.com/ping-test.html and it is pinging okay. I also restarted the server and router multiple times.

It was working fine with my old D-Link router, but not working with my new netis router. What am I doing wrong?

Thanks.

4
  • Please look at the existing posts on this topic ("Related" section, also search for "NAT hairpin"). Commented Nov 12, 2019 at 7:40
  • @grawity I'm not really networking savvy, but what I can gather about NAT hairpin is that it could be a problem only for machines in the same network trying to access the public IP. However, my IP is not accessible from outside the network either. As mentioned, I tried canyouseeme.org and also tried visiting the IP from my phone using mobile network instead of wifi. Doesn't work. Commented Nov 12, 2019 at 7:52
  • Aha, I somehow missed that part of your post. Commented Nov 12, 2019 at 7:54
  • @grawity No problem. I also checked the related posts, but could not find any solution. Commented Nov 12, 2019 at 8:02

1 Answer 1

0

Okay, so I had to edit the /etc/dhcpcd.conf file in my server and change the line static routers=192.168.0.1 to static routers=192.168.1.1. I think it was auto configured with my old router (which was at 192.168.0.1) and that's why it wasn't working with the new one (which is at 192.168.1.1). Problem fixed!

Update: After I changed the /etc/dhcpcd.conf file, Apache started causing some problems. Instead of trying to fix this one however, I just reinstalled Raspbian and now everything seems to be working fine with the fresh installation.

2
  • Do you even need the static ... line at all? This information is already delivered via DHCP anyway, that's the whole point. Commented Nov 12, 2019 at 16:49
  • @grawity I don't know really, I think I just uncommented a built-in line to set a static IP for the server before (because my old router did not have DHCP address reservation). As I said, I'm not that knowledgeable on networking, so most of the time I'm just following instructions found on the internet, hehe. Commented Nov 12, 2019 at 17:09

You must log in to answer this question.

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