Results 1 to 6 of 6
  1. #1
    Untanglit
    Join Date
    Feb 2014
    Posts
    15

    Default Query for multiple values

    Is there a SQL interface for the untangle database? I would like to search for multiple hosts using the or keyword and I don't know if this is possible in the reports module.

  2. #2
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,729

    Default

    Yes, its just postgres. you can query it directly if you'd like. the schema is in the wiki or can be viewed in postgres.

    You can also use the "in" sql operator in conditions in the UI.

    client in ('1.2.3.4','5.6.7.8')
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  3. #3
    Untanglit
    Join Date
    Feb 2014
    Posts
    15

    Default

    Thanks for the reply. Do I need to allow postgres to accept remote connections? If so, is this done in the postgres config file or through the untangle GUI?

  4. #4
    Untanglit
    Join Date
    Feb 2014
    Posts
    15

    Default

    Also, I could use the gui if the or clause was present. The in keyword would work if I had the full domain. I'm trying to query using like '%somedomain.com', or like '%anotherdomain'.

  5. #5
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,729

    Default

    Quote Originally Posted by phil435 View Post
    Thanks for the reply. Do I need to allow postgres to accept remote connections? If so, is this done in the postgres config file or through the untangle GUI?
    Sure you can do so with the access rules.
    Read the docs - if you mess your Untangle box and allow the internet to access your postgres data without authentication you will be compromised quickly.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  6. #6
    Untanglit
    Join Date
    Feb 2014
    Posts
    15

    Default

    Thanks for the info. I assume the access rule will allow the connection from an Untangle perspective but I still need to allow this in the hba.conf file for Postgres, correct? The only allowed connections I see in this file by default are local which is typical for Postgres.

    # DO NOT DISABLE!
    # If you change this first entry you will need to make sure that the
    # database superuser can access the database using some other method.
    # Noninteractive access to all databases is required during automatic
    # maintenance (custom daily cronjobs, replication, and similar tasks).
    #
    # Database administrative login by Unix domain socket
    local all postgres trust

    # TYPE DATABASE USER ADDRESS METHOD

    # "local" is for Unix domain socket connections only
    local all all trust
    # IPv4 local connections:
    host all all 127.0.0.1/32 trust
    # IPv6 local connections:
    host all all ::1/128 trust
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local replication postgres trust
    #host replication postgres 127.0.0.1/32 md5
    #host replication postgres ::1/128 md5

Posting Permissions

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

SEO by vBSEO 3.6.0 PL2