No problem. I hope you had a great vacation!
I think I managed to solve the problem making the ISP try a few different configurations on their router yesterday. I was about to write a followup to my post even though I still do not fully understand.
To answer your question, yes a simple Caddyfile like that was working. The problem arises when I use https in the Caddyfile. Caddy tries to get certificates, it gets errors and since we do not have certificates then it doesn’t work.
I still do not know what the problem was but I will lay out here the details and steps I uncovered:
- The main difference between the Fastweb and the Vodafone ISP contracts and connection is that the Vodafone contractually provided 1 static public IP address, while the Fastweb ISP contractually provided 8 static public IPs.
a. The Vodafone router was directly connected to the internet with the static public IP provided, even before I installed the secondary router, and when I installed it, I just configured the DMZ host and static NAT on their router and in my router/firewall I just set the WAN IP as static (it was a LAN IP in the Vodafone router LAN).
b. The Fastweb router was connected to the internet with a dynamic public IP and they configured somehow the router to point one of those 8 public IPs to my secondary router. The secondary router WAN side was configured directly with the static public IP address and not with a LAN IP in the Fastweb LAN. In fact if I tried and changed my router/firewall configuration using DHCP on the WAN side, I obtained an IP on the LAN of the Fastweb router and I was connected to the internet through the dynamic public IP. (checking with my ip tools on the web) - I asked the Fastweb ISP to just let go of the 7 extra IPs I don’t need and just make it so that the Fastweb router just uses that static public IP and I configured everything like in the Vodafone network. So my router has a static LAN IP in the Fastweb router network and a DMZ and static NAT is configured. That’s it! It works.
Now I am ok with this solution and I think I will not invest too much time in trying to understand the issue, but I am very curious…
Let me know if you have a better understanding of the situation and let me know if I wasn’t clear.