• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • The forum software that supports hummy.tv has been upgraded to XenForo 2.0!

    This is a major upgrade which changes the look and feel of the forum somewhat but brings a host of improvements too. Please bear with us as we continue to tweak things and report any issues or suggestions in Site/Forum Issues.

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

Wallace

Slightly Pickled
#2
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 (192.168.0.102:80)
 
OP
OP
Black Hole

Black Hole

May contain traces of nut
#3
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.
 

Wallace

Slightly Pickled
#4
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
Here we go..

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 (192.168.0.102:80)
The "from" port should be :80 also as that's the standard for http.
 

Wallace

Slightly Pickled
#6
Just entered that but still not working.

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

Wallace

Slightly Pickled
#8
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
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
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.
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.
 

Wallace

Slightly Pickled
#12
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....
 

Wallace

Slightly Pickled
#14
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.

Why?
 

Wallace

Slightly Pickled
#15
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.

Thanks.
 

xyz321

Well-Known Member
#16
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.
 

Wallace

Slightly Pickled
#17
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
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.
I guess you'd need add the line back in if the webif is updated as the config file will be overwritten?
 

xyz321

Well-Known Member
#19
I guess you'd need add the line back in if the webif is updated as the config file will be overwritten?
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.
 

af123

Administrator
Staff member
#20
I guess you'd need add the line back in if the webif is updated as the config file will be overwritten?
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.