Re: [karrigell] Re: improvement request, host=[0.0.0.0]

78 views
Skip to first unread message

peyman...@gmail.com

unread,
Jul 9, 2012, 8:15:35 AM7/9/12
to karr...@googlegroups.com
Yes. That is where it makes sense

Thank you.




Sent from Samsung mobile


Pierre Quentel wrote:

Hi,

Sorry for the late answer, I am busy on another project these days

Where should I put this host : should it be added in the attribute "hosts" of class Karrigell.App ?

Best regards,
Pierre

Le samedi 30 juin 2012 05:21:42 UTC+2, peyman@foxmemo a écrit :
Hi Pierre,

Could you please consider having host=['0.0.0.0'] to provide access from every workstation on the network?

The reason I'm asking this is that I install my software on different servers and I have to modify server.py and adjust the ip address per installation. The issue could also be resolved if a sub-net mask (0.0.0.0/24) is parsed and accepted in Karrigell.App.

Thanks!!

p.s.: ssl seems just fantastic; I still am in the process of testing it.

--
You received this message because you are subscribed to the Google Groups "karrigell" group.
To view this discussion on the web visit https://groups.google.com/d/msg/karrigell/-/30WlZmZReRcJ.
To post to this group, send email to karr...@googlegroups.com.
To unsubscribe from this group, send email to karrigell+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/karrigell?hl=en.

Nicolas Pinault

unread,
Jul 10, 2012, 4:36:02 PM7/10/12
to karr...@googlegroups.com
Have you tried setting '0.0.0.0' in hosts ?
This  should not make your application reachable from other workstations on the network.

hosts is a list of domains used to access Karrigell application. If your application is accessed only on the machine on which Karrigell is running, you have these options :
- localhost
- 127.0.0.1
- hostname of the machine your application is running on
- IP address of the machine your application is running on
By default, only localhost and 127.0.0.1 are enabled. localhost is the most used.

If you need other local network machines to access your application, then you have these options :
- hostname of the machine your application is running on
- IP addresses of the machine your application is running on
If your server has 2 or more interfaces you can set hosts with all interfaces addresses. But you can also set hosts with only one interface address to enable only one part of the network to access your application.
For example, say your server machine has a public accessible interface (WAN) and a private accessible interface (LAN). If your application must be accessible only to LAN, hosts must be set with the IP address of the interface connected on LAN.
For security reasons, hostname and IP addresses are not enabled by default.

If your application is accessed from the internet, the best way is to pay for a public domain name (like karrigell.com) and configure this domain name to point to the machine running your application. Then, in hosts, you set the public domain name.

Keep in mind that hosts must be set with hostname typed by the user in the web browser address bar.
If the user type karrigell.com in his browser, then 'karrigell.com' must be in hosts.
if the user type www.karrigell.com in his browser, then 'www.karrigell.com' must be in in hosts.

Here is an example of code you can use in your Karrigell.app class instance to make your application accessible by 'everybody' :
    import socket
    hosts = ['localhost', '127.0.0.1']
    hosts.append(socket.getfqdn().lower())      # access through workstation name enabled
    #hosts.append(socket.gethostname().lower())  # might be the same than previous one (depends on dns configuration)
    for addr in socket.getaddrinfo('', '') :    # get all interfaces addresses
        if addr[0]==socket.AF_INET :            # IPV4 address ?
            hosts.append(addr[4][0])


Hope this helps.

Best regards,
Nicolas

peyman@foxmemo

unread,
Jul 18, 2012, 10:28:09 PM7/18/12
to karr...@googlegroups.com, nic...@famillepinault.fr
Hi,

Thanks for your code and your answer.

Yes, I tried host=['0.0.0.0']; yet I cannot reach my server using it's external ip address (192.168.1.102 in my network), unless I explicitly add the public (eth0/wlan0) ip address.

and that was what I proposed: can Pierre implement the feature in Karrigell; so that host=['0.0.0.0'] would accept ALL connections? Currently, if I do not add my public ip address (192.168.1.102) in the host=[...] list, the server responds the following upon reaching http://192.168.1.102:

Error response

Error code: 404

Message: Unknown alias .

Error code explanation: 404 - Nothing matches the given URI.


Cheers!

Nicolas Pinault

unread,
Jul 30, 2012, 3:47:04 PM7/30/12
to karr...@googlegroups.com
Hi,


Le 19/07/2012 04:28, peyman@foxmemo a écrit :
Hi,

Thanks for your code and your answer.

Yes, I tried host=['0.0.0.0']; yet I cannot reach my server using it's external ip address (192.168.1.102 in my network), unless I explicitly add the public (eth0/wlan0) ip address.

This is the way it works today.


and that was what I proposed: can Pierre implement the feature in Karrigell; so that host=['0.0.0.0'] would accept ALL connections? Currently, if I do not add my public ip address (192.168.1.102) in the host=[...] list, the server responds the following upon reaching http://192.168.1.102:

I think it is not good to add this by default for security reasons.
Adding '0.0.0.0' or anything else meaning 'all requests accepted' will break the code. This is a special treatment.

Error response

Error code: 404

Message: Unknown alias .

Error code explanation: 404 - Nothing matches the given URI.


Cool, it works ;)

Best regards,
Nicolas

Cheers!

--
You received this message because you are subscribed to the Google Groups "karrigell" group.
To view this discussion on the web visit https://groups.google.com/d/msg/karrigell/-/PREuBSyK9D0J.

MrThermike

unread,
Feb 8, 2018, 2:58:17 AM2/8/18
to karrigell
Good day to everyone,
It is not clear where you setup the host['0.0.0.0'] parameter. Could you please indicate the file? Thank you
Reply all
Reply to author
Forward
0 new messages