[commandbox 5.2.1] set up for remote access within local network

53 views
Skip to first unread message

Irvin Wilson

unread,
Jan 6, 2021, 9:31:30 PM1/6/21
to ColdBox Platform
Hello!

I'm trying to access a dev site on a local Windows 10 machine via my local network using an android tablet.  I can't seem to gain access.  I tried various things with the wifi modem settings plus windows defender thinking one or the other blocking but not getting anywhere.   After quite awhile at this I tried a plain IIS html site using same method on a another high numbered non-standard port set up the same way and it comes right up so I've got the firewall set ok it seems.  It appears the server used to launch my test sites within Box has its own security that I'm having a heck of a time figuring out.  Does anyone know how to set it for access outside the host machine (on my local network)? 

Thank you!

Brad Wood

unread,
Jan 6, 2021, 11:37:03 PM1/6/21
to col...@googlegroups.com
What host do you have CommandBox bound on?  It needs to either be on a LAN IP or 0.0.0.0 to be accessible externally.  These are just basic networking rules.  By default, the host will be localhost, which isn't accessible outside the machine.

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/74c14ec9-5495-406d-919d-a37dc42b6b77n%40googlegroups.com.

Irvin Wilson

unread,
Jan 6, 2021, 11:49:48 PM1/6/21
to col...@googlegroups.com
Sorry, probably should have been more specific.  So my present server running from Coldbox is  - 


the one running under a test html site in IIS is 


In both cases I set up the appropriate (or at least identical) settings in Windows Defender and I can hit the second one from my tablet over wifi no problem. The first one (the server fired up from commandbox) simply times out.  They BOTH run fine locally from the laptop they're hosted on of course.   So I'm thinking there's some default rule in the server maybe that's not allowing connections outside the laptop itself?  For the record I'm simply doing "server start".

  

Brad Wood

unread,
Jan 6, 2021, 11:56:45 PM1/6/21
to col...@googlegroups.com
CommandBox has no such settings to deny connections.  I'm guessing the firewall isn't letting the traffic through.

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


Irvin Wilson

unread,
Jan 7, 2021, 12:03:52 AM1/7/21
to col...@googlegroups.com
Hmm, weird.  In Windows Defender I made two identical new rules.  One for the port the Lucee server is using and one for my test IIS site.  Both are identical in every way except for the port numbers.  In the one that I have the IIS site bound to I can access remotely (within my wifi) no problem.  The other hitting whatever server is hosting for Lucee no dice.  I believe the underlying server for the CommandBox server is Undertow right?  I've been googling everything I can find on undertow and access rights and nothing seems to be working. It just seems like it defaults to not allowing any external access.  I've got to think people are doing similar to what I am (testing dev sites on phones and tablets).  No ideas?  I'll keep looking.  I know it'll work but seems like it ought to be a no-brainer.  Thank you!

Irvin Wilson

unread,
Jan 7, 2021, 12:18:42 AM1/7/21
to col...@googlegroups.com
Had an idea and now I'm pretty cerrtain it's in the server setup (Undertow I guess) rather than a firewall in Windows or the modem.  I switched ports.  I set IIS test site to use 54754 and set Undertow to use 50635  (server start port=50635), the reverse of before.  Same results.  Both come up locally just fine but, again, only the IIS one comes up via the tablet on the local network.  No way possible it's Windows Defender I think since reversing the ports used gets same results.  I'll keep looking up Undertow information online.  If I find anything and get it working I'll report back here.

Brad Wood

unread,
Jan 7, 2021, 12:40:53 AM1/7/21
to col...@googlegroups.com
Undertow has no such setting that I'm aware of.  I'd use netstat to confirm the port and IP are bound as you expect.  Also check defender or any other antivirus you may have installed for rules that affect java.exe.  So long as netstat shows the port is bound on the right IP, CommandBox and Undertow are working correctly.  If it's still not working, the issue lies outside of those and somewhere in Windows or your network.

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


Irvin Wilson

unread,
Jan 9, 2021, 3:52:42 PM1/9/21
to ColdBox Platform
Finally got there by downloading Wildfly itself and messing around.  Turns out it's awful simple.  If anyone stumbles on this because you're trying to test your responsive design on a tablet (for instance) note that you'll need to start the server on your laptop like so - 

 server start port=50635 host=0.0.0.0  where port is the one you've opened in Windows Defender and host is something that can be reached on your local network (0.0.0.0 is "all").  Could also use your laptop's local IP address, for instance in my case 

server start port=50635 host=192.168.0.2

Maybe this was rudimentary but took my awhile to get there so thought it might help someone else.

Thank you!

Irvin Wilson

unread,
Jan 9, 2021, 3:54:21 PM1/9/21
to ColdBox Platform
And actually it's EXACTLY what Brad had said above but somehow I misinterpreted it.  So kind of a repeat.   Thank you Brad (belatedly)!
Reply all
Reply to author
Forward
0 new messages