I am trying to connect to an Oracle XE instance on an AWS EC2 instance. I found this answer: Connecting dto an oracle database running on ec2. The answer gave some info which I had found already , and talks about using SSH if the ports are blocked. But I don't think that is the problem here.
All AWS EC2 instances have both an internal and external IP. By default, the XE install configured tnsnames and listener for the internal IP. Is it possible to configure the listener for both IPs? When I was a wee baby, I worked at Oracle. Even back then I remember having trouble with these files. Now in my senile old age, I have no clue.


@alex-poole, thanks for the help. Had to make a few more changes to get everything working.
The default config in TNSNAMES and Listner has too much and seems to break if as soon as you add something new. I got rid of anything that was not essential.