Lan ip is the server ip

Sympl is installed on a raspberry pi behind a NAT router.

Everything seems to work OK, but I did have to slaughter goats in several different orders before ftp would work.

However, when wrestling with ftp I noticed that everything seems to think its IP address is its local lan address, not the external (fixed IP) address of the wan.

/etc/hosts says

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.1.1 redacted.co.uk

and the /config/dns/redacted.co.uk.txt files have

# The domain name itself

=redacted.co.uk:192.168.1.201:300

Shouldn’t all these (and more) be using/showing the wan IP, not the local lan address?

On the subject of the dns txt file, they all seem to have

.redacted.co.uk::a.ns.bytemark.co.uk:300
.redacted.co.uk::b.ns.bytemark.co.uk:300
.redacted.co.uk::c.ns.bytemark.co.uk:300

despite the name servers being the mythic-beasts ones.

Sympl doesn’t (currently) understand NAT, so it’ll expect the DNS and similar to be pointed at the systems primary IP address.

Obviously it’s on the roadmap to update this, using something like
https://ifcfg.me (or dig +short ANY whoami.akamai.net) to check if you’re behind NAT and adjust IP details appropriately.

As far as FTP goes, you’d want to map ports 20 and 21 (TCP), and override a range in the configuration which is properly mapped thorough for clients on PASV mode.

Is there any local place where sympl looks for the IP address?

I see that the dns template looks for <% ip %> but I’m not clear where it gets that from.

It would be helpful to be able to put the wan IP in just one place and get sympl to configure things accordingly, even if sympl can’t easily determine the wan IP.

I’ve amended the name servers in the tinydns.template.erb (will updates overwrite it?) but maybe it might be better to have that as an external variable or file too. Few people will use bytemark dns with sympl

It’s either the contents of config/ip (which will also use that IP for things like web and mail traffic, as well as configuring the network for it, so will break serving things on the LAN), or the network interface IPs if not explicitly set.

Sympl (and Symbiosis) aren’t directly compatible with running behind NAT at the moment, but as mentioned, there are plans to make this possible.

That makes sense.
Given how badly the implementation of IP6 was designed, I can see an increasing role for NAT over time.

As far as I can see, having the WAN address in the DNS is really the only vital bit.
Leaving sympl to use the LAN IP for everything else look like it should work.

Working on that assumption, I modified the erb to have the WAN IP hard-coded instead of <%= ip %> and that looks OK, though I have never got round to configuring things to upload the DNS automatically.