Page 1 of 2 12 LastLast
Results 1 to 16 of 23

Thread: Localhost to be accessible via Internet

  1. #1
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Localhost to be accessible via Internet

    Hi,

    I know that this has been well documented over the internet but I just can't seem to be able to get it working

    I have a local machine (from now on PC) on which I have a local host running (from now on service). The service is well accessible via the intranet, either on the local machine or via any other machine connected to the local intranet. The PC/server is running Windows 10 and the firewall is disabled and the ports for accessing the service are added to the list of exceptions.

    Now, I have a ASUS router, which I would like to use to port forward this service via the internet. As long as I have a DDNS registered on the router and it is getting recognised, I should just be able to enter https://myDDNS: port and theoretically I should reach the service running on the PC/server, right? But it is not happening

    Any ideas?

  2. #2
    Almost Ex-HEXUS Staff Jonatron's Avatar
    Join Date
    Sep 2009
    Location
    London
    Posts
    513
    Thanks
    43
    Thanked
    151 times in 95 posts

    Re: Localhost to be accessible via Internet

    Does it work without DDNS, as in using your external IP? You can see your external IP with http://ifconfig.io/

  3. #3
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by Jonatron View Post
    Does it work without DDNS, as in using your external IP? You can see your external IP with http://ifconfig.io/
    Even with external IP, the port forwarding still must be configured, correct? No, it doesn't work. Not sure if it makes a difference but I'm using a 3G mobile modem for the internet communication.

    On my router, I can see clearly the WAN IP (which is different from what Showip.net shows - http://ifconfig.io/ is not loading at all).

    On the port forwarding page I've selected the port range (which you enter when dialling in) the same as the local port and the port I'm using when accessing the service via the intranet. I've selected for the local IP the PC/server and the protocol which is supposed to be TCP.

    I can access the service on the intranet when I type https://localIP: port, but nothing happens if I type https://myDDNS: port or https://externalIP: port.

    Any ideas?

    EDIT: And I can confirm that i can access the ASUS router via the internet using the DDNS.

    Odd, I can only access the router via the DDNS on the PC/server, other services can't reach it from WAN.
    Last edited by Bonebreaker777; 04-09-2017 at 11:30 AM.

  4. #4
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Manchester
    Posts
    14,856
    Thanks
    1,170
    Thanked
    2,178 times in 1,802 posts
    • scaryjim's system
      • Motherboard:
      • HP Pavilion
      • CPU:
      • A10 4600M
      • Memory:
      • 2x 4GB DDR3-1600 SODIMM
      • Storage:
      • 1TB HDD
      • Graphics card(s):
      • Radeon HD7660G (IGP)
      • PSU:
      • Battery/HP 19v brick
      • Case:
      • HP Pavilion G6
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1366x768 laptop panel

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by Bonebreaker777 View Post
    ... I should just be able to enter https://myDDNS: port and theoretically I should reach the service running on the PC/server, right? ...
    Have you set up the port forwarding on the router? It won't know which local machine should service that request unless you tell it, so it'll just drop the inbound traffic. There should be a port forwarding section in your router settings where you set both the inbound port and the local machine that will deal with the traffic.

    Quote Originally Posted by Bonebreaker777 View Post
    Even with external IP, the port forwarding still must be configured, correct? No, it doesn't work. Not sure if it makes a difference but I'm using a 3G mobile modem for the internet communication....

    Any ideas?
    Heh - almost all ISPs put some degree of port blocking in place, but I suspect mobile ISPs are even more locked down than terrestrial. I'd put money on the port being blocked by the ISP, so the traffic isn't even getting to your router.

  5. #5
    Almost Ex-HEXUS Staff Jonatron's Avatar
    Join Date
    Sep 2009
    Location
    London
    Posts
    513
    Thanks
    43
    Thanked
    151 times in 95 posts

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by Bonebreaker777 View Post
    Not sure if it makes a difference but I'm using a 3G mobile modem for the internet communication.
    It's possible, mobile data can be awful with restrictions, blocking, carrier level NAT, transparent proxies, and other horrible stuff.

  6. #6
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by scaryjim View Post
    Have you set up the port forwarding on the router? It won't know which local machine should service that request unless you tell it, so it'll just drop the inbound traffic. There should be a port forwarding section in your router settings where you set both the inbound port and the local machine that will deal with the traffic.



    Heh - almost all ISPs put some degree of port blocking in place, but I suspect mobile ISPs are even more locked down than terrestrial. I'd put money on the port being blocked by the ISP, so the traffic isn't even getting to your router.
    So, theoretically all I need is the ports which are definitely not locked down by the ISP (mobile internet - Vodafon) that should be enough to get it working, right?

  7. #7
    Senior Member
    Join Date
    Jun 2005
    Posts
    1,057
    Thanks
    650
    Thanked
    96 times in 82 posts
    • Millennium's system
      • Motherboard:
      • Asus Z170 Pro Gamer ATX
      • CPU:
      • Intel i5 6600K @ 4.5GHz 4 core
      • Memory:
      • Corsair VPX 3000 DDR4 (16, 4*4)
      • Storage:
      • 500gb 850 Evo sata3 SSD, 2*2TB Green 5900 Raid 0
      • Graphics card(s):
      • MSI 390 8gb
      • PSU:
      • toughpower 1kw
      • Case:
      • Zalman Z3 Plus
      • Operating System:
      • Windows 10 64bit
      • Monitor(s):
      • VIEWSONIC VG2401MH 144hz (Solid)
      • Internet:
      • Origin ADSL Broadband, not really recommended.

    Re: Localhost to be accessible via Internet

    Localhost gets ALL ports from your ISP connection IP. I don't see a way to do this without a modem?!
    : n(baby):n(lover):n(sky)|>P(Name)>>not quite

    how do you spend your time online? (Hexus link)

  8. #8
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by Millennium View Post
    Localhost gets ALL ports from your ISP connection IP. I don't see a way to do this without a modem?!
    Sorry, what?

    Before I've added the modem to the router, the localhost was functioning fine. On all clients connected to the network (due to a SQL Express running on the main server and every client accessing the IP of the PC/server).

    You're saying:
    Quote Originally Posted by Millennium View Post
    I don't see a way to do this without a modem?!
    - you mean you're unsure if it can be done with a modem or without a modem?

  9. #9
    “High End” Admin peterb's Avatar
    Join Date
    Aug 2005
    Location
    Southampton
    Posts
    18,568
    Thanks
    2,570
    Thanked
    3,120 times in 2,486 posts
    • peterb's system
      • Motherboard:
      • Nascom 2
      • CPU:
      • Z80B
      • Memory:
      • 48K 8 bit memory on separate card
      • Storage:
      • Audio cassette tape - home built 5.25" floppy drive
      • Graphics card(s):
      • text output (composite video)
      • PSU:
      • Home built
      • Case:
      • Home built
      • Operating System:
      • Nas-sys
      • Monitor(s):
      • 12" monocrome composite video input
      • Internet:
      • No networking capability on this machine

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by Millennium View Post
    Localhost gets ALL ports from your ISP connection IP. I don't see a way to do this without a modem?!
    I don't think the OP means he is using the locahost address (127.0.0.1) but referring to the machine as the local host. IIRC, 127.x.x.x is not a routable address.

    @bonebreaker777 - what port does your service use for its inbound connections?
    (\__/)
    (='.'=)
    (")_(")

    Been helped or just 'Like' a post? Use the Thanks button!
    My broadband speed - 750 Meganibbles/minute

  10. #10
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Re: Localhost to be accessible via Internet

    Hi Peterb - you mean what port I'm using while accessing the service within the intranet? It's 8090. Why?

  11. #11
    Senior Member
    Join Date
    Aug 2013
    Location
    North Wales
    Posts
    1,704
    Thanks
    154
    Thanked
    243 times in 179 posts
    • virtuo's system
      • Motherboard:
      • Asus GRYPHON Z87
      • CPU:
      • i7 4790K @4.8Ghz Corsair H100i GTX
      • Memory:
      • 32Gb G.Skill TridentX 2400 @ CAS9
      • Storage:
      • Samsung 840 EVO 120Gb + Many, many HDs
      • Graphics card(s):
      • EVGA 980Ti FTW
      • PSU:
      • EVGA Supernova G2 750W
      • Case:
      • be quiet! Dark Base Pro 900 (Orange)
      • Operating System:
      • Win10, Fedora
      • Monitor(s):
      • 2x Dell U2515H 1440p DELL U3415W Ultrawide for Work
      • Internet:
      • PlusNet Unlimited 80Mb

    Re: Localhost to be accessible via Internet

    I think a good first test would be to try connecting to another known service on the same port from your device - don't think you've mentioned what port it is you are using, but proving that you can use that port/protocol on another server would go some way to pinpointing your own issue.

    As already mentioned, mobile data is massively restricted and is prime suspect so far

  12. #12
    “High End” Admin peterb's Avatar
    Join Date
    Aug 2005
    Location
    Southampton
    Posts
    18,568
    Thanks
    2,570
    Thanked
    3,120 times in 2,486 posts
    • peterb's system
      • Motherboard:
      • Nascom 2
      • CPU:
      • Z80B
      • Memory:
      • 48K 8 bit memory on separate card
      • Storage:
      • Audio cassette tape - home built 5.25" floppy drive
      • Graphics card(s):
      • text output (composite video)
      • PSU:
      • Home built
      • Case:
      • Home built
      • Operating System:
      • Nas-sys
      • Monitor(s):
      • 12" monocrome composite video input
      • Internet:
      • No networking capability on this machine

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by Bonebreaker777 View Post
    Hi Peterb - you mean what port I'm using while accessing the service within the intranet? It's 8090. Why?
    Just checking its not a common one blocked by some ISPs as an attack vector

    So you have port forwarding on the router to forward port 8090 to the hosts local IP address?
    (\__/)
    (='.'=)
    (")_(")

    Been helped or just 'Like' a post? Use the Thanks button!
    My broadband speed - 750 Meganibbles/minute

  13. #13
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by peterb View Post
    Just checking its not a common one blocked by some ISPs as an attack vector

    So you have port forwarding on the router to forward port 8090 to the hosts local IP address?
    So as long as I've set a port, for example 123, which I'll be dialling from the outside and the router redirects it localIP :8090, all should be fine, right?

    Would it be better to attempt VPN - as long as I would be part of the virtual local intranet, I should be able to access the localIP without an issue, correct?

    Under VPN I mean to create a VPN on the router or that won't work, would it?
    Last edited by Bonebreaker777; 05-09-2017 at 11:39 AM.

  14. #14
    “High End” Admin peterb's Avatar
    Join Date
    Aug 2005
    Location
    Southampton
    Posts
    18,568
    Thanks
    2,570
    Thanked
    3,120 times in 2,486 posts
    • peterb's system
      • Motherboard:
      • Nascom 2
      • CPU:
      • Z80B
      • Memory:
      • 48K 8 bit memory on separate card
      • Storage:
      • Audio cassette tape - home built 5.25" floppy drive
      • Graphics card(s):
      • text output (composite video)
      • PSU:
      • Home built
      • Case:
      • Home built
      • Operating System:
      • Nas-sys
      • Monitor(s):
      • 12" monocrome composite video input
      • Internet:
      • No networking capability on this machine

    Re: Localhost to be accessible via Internet

    The port you are connecting to might be relevant - try using one above 1024.

    Yes a VPN should work.
    (\__/)
    (='.'=)
    (")_(")

    Been helped or just 'Like' a post? Use the Thanks button!
    My broadband speed - 750 Meganibbles/minute

  15. #15
    Senior Member Bonebreaker777's Avatar
    Join Date
    Dec 2012
    Location
    Herts, UK
    Posts
    1,927
    Thanks
    26
    Thanked
    184 times in 171 posts
    • Bonebreaker777's system
      • Motherboard:
      • MSI H97I AC
      • CPU:
      • Xeon 1225 v3 + Freezer 11 L
      • Memory:
      • 2 x 4GB 1600Mhz 1T-8-8-8-20 1.35V Crucial BallistiX Tactical VLP
      • Storage:
      • 128GB CRUCIAL MX100///XPEnology server + 3 x WD Purple 3TB
      • Graphics card(s):
      • Intel HD 4600
      • PSU:
      • be quiet! L8 300W PSU BN220
      • Case:
      • Cooler Master Elite 120
      • Operating System:
      • Windows 10 Pro 64bit
      • Monitor(s):
      • Samsung SyncMaster 226BW
      • Internet:
      • Virgin 100Mb

    Re: Localhost to be accessible via Internet

    Quote Originally Posted by peterb View Post
    The port you are connecting to might be relevant - try using one above 1024.

    Yes a VPN should work.
    Well. The following happened:
    - DDNS successfully registered, according to the router
    - Port forwarding enabled - entered the local port to be targeted, the local IP to be targeted and the port I'll be using externally (port 1666)
    - Once the router refreshed with the new settings, I've hit myDDNS :1666 and nothing happened (This site can't be reached)
    - Added port 2048, just to be sure - same results :|

    So, VPN - what should I do exactly
    - Create a VPN server on this router with the mobile connection and try clients connecting to it?
    - Sign up for a commercial VPN service and have both the router and the clients connect to...?

  16. #16
    mush-mushroom b0redom's Avatar
    Join Date
    Oct 2005
    Location
    Middlesex
    Posts
    3,223
    Thanks
    137
    Thanked
    316 times in 243 posts
    • b0redom's system
      • Motherboard:
      • Some iMac thingy
      • CPU:
      • 3.4Ghz Quad Core i7
      • Memory:
      • 24GB
      • Storage:
      • 3TB Fusion Drive
      • Graphics card(s):
      • nViidia GTX 680MX
      • PSU:
      • Some iMac thingy
      • Case:
      • Late 2012 pointlessly thin iMac enclosure
      • Operating System:
      • OSX 10.8 / Win 7 Pro
      • Monitor(s):
      • Dell 2713H
      • Internet:
      • Be+

    Re: Localhost to be accessible via Internet

    Ok, here's some specifics:



    Let's say you have the above setup - the IPs are obviously all made up.

    It's safest to use IP addresses instead of DDNS as that will reduce the troubleshooting complexity.

    As a user outside the firewall, in order to access the daemon running on port 8090, you need to:

    Set up port forwarding so that port 8999->192.168.0.248:8090

    Note that it's exceptionally likely that this needs to be done for TCP (not UDP). Servers running around 8090 are usually webapps like confluence/JIRA.

    When you now hit: http://30.40.50.80:8999 traffic will be sent to the daemon on port 8090 of 192.168.0.248.

    The above assumes a domestic router without additional firewall rules etc.

    If you attempt to connect to http://30.40.50.60:8999 from inside the firewall (ie from your local LAN) weird stuff may happen depending on how the firewall/router works.

    Once this is all working, you can set up DDNS and start using domain names.

    If you still hit problems, it's worth seeing what IP address the daemon is bound to on the server so something like:

    netstat -an

    and look for port 8090.

    It needs to be listening to either 0.0.0.0 (linux) or [::] (windows) - which means listen to all IP addresses associated with the server or, in the example above 192.168.0.248. It's possible that for whatever reason it's bound to 127.0.0.1.

    I would assume that either you're not port forwarding to the daemon correctly or you're doing UDP instead of TCP.

    If all of the above still doesn't work, have you checked ACLs on the application itself and the software firewall on the server? If you can access it from your local subnetwork, but not the Internet, it's possible that there's some security causing it not to respond.

    If that STILL doesn't help, what happens if you attempt to telnet to the port from outside the firewall - ie in the above case:

    telnet 30.40.50.60 8999

    That causes a very basic TCP connection. You should be able to tell from that whether or not a connection is being established or whether it's being blocked.

    All of the above assumes that you're using a domestic/SOHO router. If you're doing something more business grade, you may have to worry about routing/hardware firewalls.

    A few more details would help with troubleshooting a great deal. What OS is the server running? What's the application you're trying to expose? What's the model of the firewall etc.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •