1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Modded: Accessing the Web Interface (WebIF) from the External Internet

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by Black Hole, Aug 29, 2011.

  1. Black Hole

    Black Hole May contain traces of nut

    This topic is to capture the ongoing discussion that has spawned slightly off-topic in another thread HERE (click).
  2. Wallace

    Wallace Slightly Pickled

    Here we go..

    I have installed the iPhone WebIF package on the Hummy and it works well with my iPhone4 when I am connecting via my home network. It's convenience would be greatly enhanced for me, and I suspect other users, if I could access the Hummy from outside my local network.

    I am unsure how to do this correctly.

    Port forwarding needs to be configured in my router. It is a D-Link DIR-825 running dd-WRT firmware connected to 10Meg CABLE broadband from Virgin Media.

    I have my external IP address and the internal IP address of my Hummy. I believe that I need to forward the external address to port 80 of the internal address.

    Now, my routers asks me for the external IP address, that bit's easy. It also asks me for the port number to forward FROM. This I don't know. I do know the IP address and port that I am forwarding TO (
  3. Black Hole

    Black Hole May contain traces of nut

    Hypothetically (because I don't intend to do it), my preference would be to set up a VPN (virtual private network) so that the access on the public internet is encrypted. However, that would require your PC also to be running to establish a VNP node.
  4. Wallace

    Wallace Slightly Pickled

    That is correct, but at this time I am finding the simple task of port forwarding a challenge, never mind setting up a VPN.

    I don't leave my PC switched on when not at home anyway.
  5. Tawny

    Tawny Member

    The "from" port should be :80 also as that's the standard for http.
  6. Wallace

    Wallace Slightly Pickled

    Just entered that but still not working.

    It also asked for which protocol, TCP & UDP. I have selected both, but still no-go.
  7. Tawny

    Tawny Member

    You just need TCP.

    Does it show any error message when you try and access they url?
  8. Wallace

    Wallace Slightly Pickled

    No error message, just a blank page. TBH, I don't even think it's getting as far as my Hummy. I did TEMPORARILY disable my routers SPI firewall and other security features, but still no-go.

    I am right in thinking that to view the Hummy's WebIF from an external network, I just enter the EXTERNAL IP address followed by/iPhone. For example http://xxx.xxx.xxx.xxx/iphone

    If I could also figure out how to upload a screen shot of my routers config page that too might help.
  9. Tawny

    Tawny Member

    Maybe someone with more knowledge can help but in the past I've had issues accessing the external ip address when connected on the local network but thing that was a router issue.
  10. MattC

    MattC Member

    Indeed. Depends on your router.. the one from O2 works fine, but the BT Homehub that I have makes it impossible to access it via the external IP.. I end up having 2 bookmarks; one for external access, one for internal.
  11. MattC

    MattC Member

  12. Wallace

    Wallace Slightly Pickled

    You won't believe this, but I have got it working. I have found that if I leave the source IP address blank, I.E. the external IP address, but enter the port FROM (80) and leave the internal IP address of my Hummy on port 80, it works.!

    To access the Hummy iPhone WebIF is enter: http://xxx.xxx.xxx.xxx/iphone from anywhere on the Internet.

    I cannot understand why I have to leave that field blank. I have confirmed on several different websites what my external IP address is, indeed I also have a Windows7 Network gadget running on my desktop that also confirms it.

    Next thing is to secure it. I seem to remember that being mentioned before....
  13. MattC

    MattC Member

    Just check the wiki :)
  14. Wallace

    Wallace Slightly Pickled

    I have checked the WiKi and have chosen the localhost option.

    I can confirm that when I try to connect to the WebIF from my PC, I am prompted for my user name and password (I changed them from those in the WiKi for obvious reasons), before the WebIF is shown. So it works.....to a degree.

    However, when I access the WebIF via the Internet thus: http://xxx.xxx.xxx.xxx/iphone, the WebIF is NOT secure.

  15. Wallace

    Wallace Slightly Pickled

    Ah, I might have it, check out the iphone sub directory and add the password file there too!

    I am trying it now......

    edit: YES it works....

    You have to add the

    '/mnt/hd2/mod/sbin/mongoose -A ./.htpasswd mydomain.com admin pass'

    line to BOTH directories

    As I said, I have changed 'mydomain.com' to localhost, and the password to something unique to me.

    MattC likes this.
  16. xyz321

    xyz321 Well-Known Member

    This is probably not the best solution since there are quite a number of sub-directories in the mongoose tree and it would be a bit of a pain to secure them all using this method.

    A better method might be to create the .htpasswd file in /mod/etc then edit /mod/etc/mongoose.conf to include the line:

    global_passwords_file /mod/etc/.htpasswd

    You may have to restart mongoose after making these changes. It will then ignore any per-directory .htpasswd files and only use /mod/etc/.htpasswd for all directoies.
  17. Wallace

    Wallace Slightly Pickled

    Thanks for the tip. I will check it out.

    edit: Thank you, a more 'elegant' solution I think. It works a treat, although as you hinted, I did have to re-start Mongoose for it to work.
    Although one downside of this method is I have to enter the p/w even when I want to view the Hummy on my networked PC rather just when I access the Hummy from the Internet. I am not bothered that much and I could always go back to the 'other' method and put the password file in the one directory.
  18. Tawny

    Tawny Member

    I guess you'd need add the line back in if the webif is updated as the config file will be overwritten?
  19. xyz321

    xyz321 Well-Known Member

    Perhaps the line should be added to the next package update or alternatively the file should be flagged as a config file so that it never gets overwritten.
  20. af123

    af123 Administrator Staff Member

    It's the mongoose package which isn't often updated, and the mongoose.conf file is flagged as a config file so your local changes will not be overwritten.