Local host address server tip

123 views
Skip to first unread message

TonyM

unread,
Mar 31, 2020, 11:28:29 PM3/31/20
to TiddlyWiki
Folks,

I was exploring various alternatives for the local host addresses in Bob, TiddlyServer and I expect what I found would be the same for node installs.

Problem
  • Normally on my home LAN my Bob and tiddly server are accessible on the LAN
  • To keep it tidy and so it did not interfere with my DHCP (fixed)  network address I defined more addresses on my Network adaptor
    • Eg Desktop 192.168.1.119 (DHCP) TiddlyServer on 192.168.1.81, Bob on 192.168.84
    • I have shared this tip previously
  • However when I connect to another lan like my hot spot these addresses are on the Wrong Network eg 192.168.3.X and do not work even just locally. 
Discovery
  • I discovered IPv4 network standards reserve the entire address block 127.0.0.0/8 (more than 16 million addresses) for loopback purpose
  • Which made me aware that 127.0.0.1 is not the only available local host address
Tip/Solution
  • This means more than one instance of TiddlyServer and Bob/Bob.exe can be set to a local host address, 
  • This leaves 127.0.0.1 free for hosting other servers.
  • I tested this and it works well eg I use 127.0.4.80 127.0.4.81 127.0.4.82 127.0.4.83 127.0.4.84
Extension
  • I hope that I am be able to configure TiddlySaver, Bob and Node to Share on the addresses 192.168.1.80 - 84 in addition to the local host address
  • This will only work when I am on the 192.168.1.x network
  • When on other networks such as 192.168.3.X or some shared network such as my "hot spot" they will not be available on the LAN
  • In my browser, on the computer hosting the servers, I will always use the different local host addresses, and they will always be available when the computer is on any network but private unless at home / 192.168.1.x networks which means I time I may change this.
  • Further investigation of The Internet Assigned Numbers Authority (IANA) which has reserved 169.254.0.0-169.254.255.255 for Automatic Private IP Addressing. As a result, APIPA provides an address that is guaranteed not to conflict with routable addresses.
Regards
Tony

Scott Kingery

unread,
Apr 1, 2020, 12:40:24 AM4/1/20
to TiddlyWiki
Hi Tony,
Can't you just use different ports? 127.0.0.1:8081 for something and 127.0.0.1:8082 for something else?

Maybe I'm missing what you are trying to do.

Scott 

TonyM

unread,
Apr 1, 2020, 1:18:18 AM4/1/20
to TiddlyWiki
Scott,

Yes you can, and I did so previously. However whatever you install, it may be a tiddlywiki server, or AMMPS LAMP MAMP or some other server they typically use port 80 or 8080 on 127.0.0.1 out of the box so a chance of a clash is high. You thus have to manage it.

Bob will grab the next port but the local links will need to change if the port changes

I moved to additional IP addresses for on my lan so I could establish a DNS entry for Bob as an example on its own IP address. If later I move Bob to another computer I just move the additional IP Address as well and it will continue be at the same address.

However this breaks down on a new network, without the same DNS or network

This solves the new network and local host problem by moving the server to 127.X.4.X fixed address, so it works no matter the network on my laptop and will only be available on the LAN if I am on the "correct" network

I have not done it yet but I believe I can set it to be available on the LAN using one of my "Additional" IP Addresses however multiple servers will always be locally available with the custom 127 address's and will use whatever port they want with no need to increment up to an available port.

Is that a little clearer?

Regards
Tony

PMario

unread,
Apr 1, 2020, 6:43:29 AM4/1/20
to tiddl...@googlegroups.com
Hi Tony,

Why don't you use the "hosts" file. It still works for Windows, Mac and Unix systems. It allows you to use your own domain names and assign them IP4 adresses.

eg: URLs like

http://ts.lan:8080    ... will be converted to 192.168.1.83:8080
http://bob.lan:8080 ... will be converted to 192.168.1.84:8080
http://wiki.lan:8080 ... will be converted to 192.168.1.85:8080

To start the TW server it would look like: tiddlywiki edition --listen host=wiki.lan


The default port setting will still be 8080 ... which may be a problem for external links. The only solution you have here is a proxy server in front of your other servers.

Proxies "catch" all the traffic to port 80 and reroute it to other IP:PORT combinations you can set up. But that's a different topic.

There is a post here in the group, how to use an nginx-proxy on unix-like systems. 

https://tiddlywiki.com/#Installing%20TiddlyWiki%20on%20Microsoft%20Internet%20Information%20Server describes 1 way to create a IIS "proxy" and start IIS apps, like tiddlywiki.

just some thoughts.

-mario

TonyM

unread,
Apr 1, 2020, 7:00:53 AM4/1/20
to TiddlyWiki
Mario

I did fiddle with host file in the past for this. I do in fact have a dns on my synology NAS and have bob.local ts.local etc for my 192.168 1.8x addresses.

The problem is when I go to my shack, my parents or a cafe all my ip addresses are wrong. So I need to access all my servers on my laptop via a local host address. Rather than piling all servers onto 127.0.0.1 and thus having to manage port numbers I know just use the other local host addresses I did not realise were available until recently and work with the node implementations.

I will look at the proxy info you shared sooner or later.

Thanks for adding to this thread

Regards
Tony

PMario

unread,
Apr 1, 2020, 12:30:30 PM4/1/20
to tiddl...@googlegroups.com
Hi Tony,

Yea, I was thinking about a "universal private network". ... eg: https://www.zerotier.com/

I think it uses a very interesting approach and has client software for PC, Mac, IOS and Android and it also works for synology NAS systems.

There is a recent article with some more info and screenshots: https://www.spikefishsolutions.com/post/setting-up-remote-access-during-a-crisis

The only thing, that kept me away was, that you have to use their server to configure the stuff. It is used to help the devices to find each other.

But reading more about the underlying concepts is seems they use end to end encryption on OSI layer 1, which they call VL1, since the whole thing creates a new virtual Ethernet switch. Still not sure who stores the private keys. .. So a little bit more to read for the "paranoia guy" like me ;)

So the whole network is a VPN-like transparent network that can be used from all over the world. ...

Would be really worth a try.

BUT the addresses would still have the :8080 port bit ;) ... But all your network "juggling" would go away.

have fun!
mario

TonyM

unread,
Apr 1, 2020, 8:14:02 PM4/1/20
to TiddlyWiki
Mario

Or is that Paranoia Mario? ;), I am glad you are reviewing it.

My above solution is Actualy simple and effective. All I do is set the server local address to a 127.0.4.8x address. Rather than using 0.0.0.0 to host on the lan I use 192.168.1.8x for each server (currently additional ip addresses on my laptop) and it is only accessible on the lan when I am on the 192.168.1.x network, and my own computer can always access them at the local host addresses.

But I look forward to finding new methods.

Regards
Tony

Arlen Beiler

unread,
Apr 20, 2020, 1:38:16 PM4/20/20
to TiddlyWiki
TiddlyServer allows you to specify a range of IP addresses to listen on. 


You might need to experiment a little with different options. BindWildcard only binds to 0.0.0.0 and then filters requests as they come in (if filterBindAddress is also set). 

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/80822280-1a08-41e9-9e16-8a6a88f3b834%40googlegroups.com.

Arlen Beiler

unread,
Apr 20, 2020, 1:41:05 PM4/20/20
to TiddlyWiki
I might have said that last part wrong. The docs should have it correct. 
Reply all
Reply to author
Forward
0 new messages