Dale Van Aken's picture

Sorry if this is a noob question - just launched my first site on AWS using TLK Wordpress.  At the TKL Config Console, it shows the IP of the web server (172.xxx.xxx.xxx) plus all the port variations for webmin, PHPMyAdmin, etc.  This IP does not seem to be usable in any way - I have pointed my domain name to the EC2 instance IP and the site responds fine.  Is this correct?  It seems odd to me, especially since when dumping out the DB for the site, I found a line that shows the TKL address, not the EC2 instance address.

[SERVER_ADDR] => 172.xxx.xxx.xxx

Do I need to make any changes or do I just ignore the 172....  address?  Why does it exist?Thanks.

Forum: 
Tags: 
Jeremy Davis's picture

Conf Console will display the private IP whereas you'll need to use the Public IP of your instance to contact it via the net. It sounds like you have your domain configured too, so you could also use that. E.g. Webmin would be https://example.com:12321

Liraz Siri's picture

Technically speaking, I think we might be able to fix this if you're on the public Internet and can reach the Hub: https://github.com/turnkeylinux/tracker/issues/234
Dale Van Aken's picture

I am concerned/confused about the SERVER_ADDR being in the 172.x.x.x range.  I'm not sure of the significance of this variable, but it's expressing an address that can't be reached from the Internet.  I can modify it, but I'll wait to hear back for instructions. Thank you.

Jeremy Davis's picture

But really it should be immaterial. Really it's the same as a PC giving it's local IP address (that is only available from within the LAN and not over the internet). I'm no Amazon expert, but AFAIK the private IP is contactable, but only from within an AWS vLAN (basically like I said about giving it's LAN address).

Personally I don't use confconsole much other than local VMs where I want to set a static IP.

As to specifically answer your question though, this will be adjusted/fixed sometime in the future (not sure when, but possibly months away) and even when it is it will probably require user intervention to update to the new version. If it's an issue for you then I recommend that you have a tinker with it and see how you go. If you get it working the way you want then please feel free to post back.

If you're really keen then the source can be found here and you could even issue a pull request if you can work out how to do the fix yourself! :)

Dale Van Aken's picture

Now confconsole checks for an external address and if different from interface ip address it displays it instead.  I have to figure out how to handle exceptions in python so the code is not by any means completed (I smoked a lot of C code in my youth).  Does this approach seem ok?

Liraz Siri's picture

Great. When you feel the code is ready, send me a pull request. FWIW, Python has really good exception handling:

try:
        this_function_raises_an_exception()

except:
        print "an exception happened"

If you want to catch a specific exception (you probably do):

try:
        this_function_raises_an_exception()
except EvilException, e:
        print "specific exception raised: " + str(e)

I used to do all of my programming in C and raising exceptions is superior compared with returning weird error values.

Let me know if you need any help.

Add new comment