Take IPv4 visitors through another server
Many home internet providers share one IPv4 address between customers, and many routers don't forward ports 80 and 443. Either way, people can't reach a server at home over IPv4.
If another of your servers is reachable over IPv4, Coresmith can send visitors through it. That server answers on its own IPv4 address and passes each request on over WireGuard, an encrypted link between the two servers. Nothing has to be opened on your router, and only the two servers limit how big an upload can be or how long a page can take. Without a second server, IPv4 through Cloudflare does the same job within Cloudflare's limits.
When Coresmith offers it
Coresmith checks each server's IPv4 address from outside your network. When ports 80 and 443 don't answer there, the server's Apps tab says visitors without IPv6 can't open its apps, and its Network tab shows an IPv4 through another server card.
Before you start
- You need another server in the same team that the internet reaches over IPv4. Coresmith lists only those when you turn this on. It keeps running its own apps as before.
- That server takes the link on UDP port 51871. Coresmith opens the port in the server's own firewall. If its provider has a firewall in front of it, open UDP 51871 there too.
- IPv4 through Cloudflare has to be off for the server. A server takes its visitors in one way at a time.
- On self-hosted Coresmith, add the machine Coresmith runs on as a server if Coresmith's own address should come through as well. Add this machine.
Team owners can turn it on and off.
Turn it on
- Open the server's Network tab.
- On the IPv4 through another server card, choose Turn on.
- Under Server, pick the server that takes the visitors in.
- Choose Turn on.
The card reads Setting up for a minute or two while Coresmith links the two servers and sends the domains through the one you picked. Then it reads On and counts the domains that reach the server through it. Show the domains lists them.
What changes in your DNS
Every domain of the apps on the server goes through the other server. So does Coresmith's own address when the server is the machine Coresmith runs on. Each domain needs DNS records that point at the other server instead of this one.
On self-hosted Coresmith with Cloudflare connected in Settings, Coresmith changes them for you in every zone its token can see. It replaces the records that point at this server with an A record for the other server's IPv4 address, plus an AAAA record when that server has IPv6, with Cloudflare's proxy off. A domain with no records yet gets them too. When a domain's records point somewhere else, Coresmith leaves it alone and lists it under Left as they were with the reason.
Otherwise you set the records yourself. The card lists every domain that doesn't point at the other server yet, with the records it needs. Add them where your domains' DNS is hosted, then choose Check again.
Domains that don't come through yet
The card names each domain that doesn't reach the server through the other server yet, and says why. When a domain doesn't point at the other server, set the records the card shows. When it points there but its page didn't load, check that its app is deployed on the server.
Coresmith doesn't add records for a www name that has none. Once you add them, it comes through like the others.
Domains you add to apps on the server later come through on their own, and Add domain shows the other server's addresses instead of this server's. Coresmith checks every hour, and Check again on the card checks right away.
Coresmith's own address
When the server is the machine Coresmith runs on, Coresmith's address comes through the other server too. The Address card in Settings, General then stops warning that the address has only IPv6.
Coresmith's address can't change while its visitors come in this way. Turn this off on the server's Network tab, change the address in Settings, then turn it on again.
What your apps see
Apps get each visitor's own address first in the X-Forwarded-For header, followed by an address from the link between the two servers, in the range 10.205.0.0/16. An app that reads only the last address in that header sees the link's address, so tell it to trust addresses in that range.
Turn it off
Choose Turn off on the card, then Turn off again to confirm. Coresmith unlinks the two servers and takes the domains off the other server. With Cloudflare connected, it also points them back at this server's own addresses. Without it, point them back yourself, or they stop loading. After that, visitors without IPv6 can't reach the apps unless the server's IPv4 address answers.
While the other server takes visitors in for this one, Coresmith won't remove it. Turn this off on this server's Network tab first.
If it doesn't finish
The card says what stopped it and offers Try again. Most often the other server didn't answer over WireGuard: allow UDP 51871 into it in your provider's firewall, then try again. When something else on one of the servers already uses the link's address range or port, the card names it and says what to change.