1

I can only connect to my Apache server using devices on the local network and not from the outside.

I think that this is a port forwarding issue, as I'm getting a Connection Timed Out for the port 8080 (I changed the default port in ports.conf) via canyouseeme.org.

I believe that I modified my port forwarding rules correctly by having the correct IP address and 8080 as both the external and internal start port so I don't think that this is the cause of the issue. Additionally, I checked that my Apache server was listening on port 8080 via the netstat command and disabled the firewall with "sudo ufw disable".

Currently, the only workaround is to set up a default DMZ server with the same IP as my apache server, but I don't want to rely on this. Any tips? Perhaps this may have to do with the NAT configurations on my Netgear Nighthawk R7000P router?

Screenshot of port forwarding configuration: enter image description here

Screenshot of tcpdump to see if outside packets are reaching the server: enter image description here I am trying to reach my server using my mobile device's data plan which is designated by ue.tmodns.net.20432.

2
  • Can you take a screenshot of the port forwarding setting on your router then edit the screenshot into your question so that we can check that you have your port forwarding set up correctly? Nov 11 '20 at 18:57
  • Hi Stephen, thanks for the response! Please see above for my screenshot.
    – YeezySec
    Nov 12 '20 at 1:21
1

"Currently, the only workaround is to set up a default DMZ server with the same IP as my apache server" - This strongly implies that the issue is indeed with port forwarding, and definately exists on your router. - if a DMZ works it pretty much rules out a config issue on any device other then your router.

I note you havnt mentioned protocol - you should check you should check you are allowing TCP through on the correct port.

5
  • Hi davidgo, appreciate the response! You can confirm with my screenshot above, but I believe that I am allowing TCP through on the correct port.
    – YeezySec
    Nov 12 '20 at 1:24
  • Yes, that does look right to me. The next thing I would do is run a tcpdump on the web server and hit it with traffic from the outside world and see if packets are reaching the webserver (and if so, from what IP) - likewise with the destination. It might be worth looking at DD-WRT for the router.
    – davidgo
    Nov 12 '20 at 1:35
  • Just on the off-chance - try (temporarily) dropping the firewall (if it exists) on the webserver and see if it fixes it. Maybe there is an unintended block for external IPs and using a DMZ is maybe rewriting the requests source address - though I would not have thought this likely.
    – davidgo
    Nov 12 '20 at 1:36
  • Davidgo, apologies for the delay in getting back to you. Just ran tcpdump while trying to connect via my mobile device and it seems like packets are reaching the server. Please see my my screenshot above for the tcpdump output.
    – YeezySec
    Nov 18 '20 at 16:32
  • Yup, it looks like your router is the culprit. Maybe try updating the firmware on it or change it to dd-wrt?
    – davidgo
    Nov 18 '20 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.