Can relay_ipv4_addr and relay_ipv6_addr be set as an FQDN?
NagaseYami opened this issue · 4 comments
I often switch between multiple VPS providers because some of them offer better deals. This leads to frequent changes in my IP address, and I don't want to modify configuration files or environment variables each time.
Of course, I could also try writing a shell script to make a DNS request each time before starting Eturnal and then output the response to environment variable.
this is covered in https://eturnal.net/doc/
I often switch between multiple VPS providers because some of them offer better deals. This leads to frequent changes in my IP address, and I don't want to modify configuration files or environment variables each time.
Can't you just omit the relay_ipv4_addr
and relay_ipv6_addr
options altogether? eturnal should figure out the correct relay address(es) by default, unless the server is behind NAT or has multiple public addresses (check the startup [info]
messages in the eturnal log).
Of course, I could also try writing a shell script to make a DNS request each time before starting Eturnal and then output the response to environment variable.
You could create an /etc/eturnalctl.cfg
file such as the following:
export ETURNAL_RELAY_IPV4_ADDR=$(curl -4fsS 'https://ifconfig.co/ip')
export ETURNAL_RELAY_IPV6_ADDR=$(curl -6fsS 'https://ifconfig.co/ip')
(The eturnalctl.cfg
file isn't documented so far, but we have no plans to remove support for it.)
unless the server is behind NAT or has multiple public addresses
Yes, I use multiple VPS servers for reverse proxy (port forwarding) in order to conceal the actual IP address of the real server. Therefore, I cannot run the automatic IP detection feature on the real server.
You could create an /etc/eturnalctl.cfg file such as the following:
Thank you very much, this is exactly what I wanted!
In my case, it should be
export ETURNAL_RELAY_IPV4_ADDR=$(dig +short example.com A)
export ETURNAL_RELAY_IPV6_ADDR=$(dig +short example.com AAAA)