I am trying to connect a Google Docs extension to a MySQL database via JDBC Service. The MySQL database is running on a shared server that requires using CPanel. CPanel only lets me add one whitelist rule at a time, and I can only use the % wildcard character (which matches to 0 or more of any type of character). I wrote a script to generate rules in this format from the IP address ranges, but there are more than 300 of them. I'm trying to find an easier way to do this.
Is there a domain name for the Google JDBC Service that I can whitelist instead of the IP address ranges? Does CPanel have a more efficient whitelisting mechanism that I'm not aware of? Is there a program that could automate filling out CPanel's webform with my whitelist?
Here is the CPanel-formatted whitelist I generated, in case someone with the same problem finds my question.
64.18.0.%
64.18.1.%
64.18.2.%
64.18.3.%
64.18.4.%
64.18.5.%
64.18.6.%
64.18.7.%
64.18.8.%
64.18.9.%
64.18.10.%
64.18.11.%
64.18.12.%
64.18.13.%
64.18.14.%
64.233.160.%
64.233.161.%
64.233.162.%
64.233.163.%
64.233.164.%
64.233.165.%
64.233.166.%
64.233.167.%
64.233.168.%
64.233.169.%
64.233.170.%
64.233.171.%
64.233.172.%
64.233.173.%
64.233.174.%
64.233.175.%
64.233.176.%
64.233.177.%
64.233.178.%
64.233.179.%
64.233.180.%
64.233.181.%
64.233.182.%
64.233.183.%
64.233.184.%
64.233.185.%
64.233.186.%
64.233.187.%
64.233.188.%
64.233.189.%
64.233.190.%
66.102.0.%
66.102.1.%
66.102.2.%
66.102.3.%
66.102.4.%
66.102.5.%
66.102.6.%
66.102.7.%
66.102.8.%
66.102.9.%
66.102.10.%
66.102.11.%
66.102.12.%
66.102.13.%
66.102.14.%
66.249.80.%
66.249.81.%
66.249.82.%
66.249.83.%
66.249.84.%
66.249.85.%
66.249.86.%
66.249.87.%
66.249.88.%
66.249.89.%
66.249.90.%
66.249.91.%
66.249.92.%
66.249.93.%
66.249.94.%
72.14.192.%
72.14.193.%
72.14.194.%
72.14.195.%
72.14.196.%
72.14.197.%
72.14.198.%
72.14.199.%
72.14.200.%
72.14.201.%
72.14.202.%
72.14.203.%
72.14.204.%
72.14.205.%
72.14.206.%
72.14.207.%
72.14.208.%
72.14.209.%
72.14.210.%
72.14.211.%
72.14.212.%
72.14.213.%
72.14.214.%
72.14.215.%
72.14.216.%
72.14.217.%
72.14.218.%
72.14.219.%
72.14.220.%
72.14.221.%
72.14.222.%
72.14.223.%
72.14.224.%
72.14.225.%
72.14.226.%
72.14.227.%
72.14.228.%
72.14.229.%
72.14.230.%
72.14.231.%
72.14.232.%
72.14.233.%
72.14.234.%
72.14.235.%
72.14.236.%
72.14.237.%
72.14.238.%
72.14.239.%
72.14.240.%
72.14.241.%
72.14.242.%
72.14.243.%
72.14.244.%
72.14.245.%
72.14.246.%
72.14.247.%
72.14.248.%
72.14.249.%
72.14.250.%
72.14.251.%
72.14.252.%
72.14.253.%
72.14.254.%
74.125.%
173.194.%
207.126.144.%
207.126.145.%
207.126.146.%
207.126.147.%
207.126.148.%
207.126.149.%
207.126.150.%
207.126.151.%
207.126.152.%
207.126.153.%
207.126.154.%
207.126.155.%
207.126.156.%
207.126.157.%
207.126.158.%
209.85.128.%
209.85.129.%
209.85.130.%
209.85.131.%
209.85.132.%
209.85.133.%
209.85.134.%
209.85.135.%
209.85.136.%
209.85.137.%
209.85.138.%
209.85.139.%
209.85.140.%
209.85.141.%
209.85.142.%
209.85.143.%
209.85.144.%
209.85.145.%
209.85.146.%
209.85.147.%
209.85.148.%
209.85.149.%
209.85.150.%
209.85.151.%
209.85.152.%
209.85.153.%
209.85.154.%
209.85.155.%
209.85.156.%
209.85.157.%
209.85.158.%
209.85.159.%
209.85.160.%
209.85.161.%
209.85.162.%
209.85.163.%
209.85.164.%
209.85.165.%
209.85.166.%
209.85.167.%
209.85.168.%
209.85.169.%
209.85.170.%
209.85.171.%
209.85.172.%
209.85.173.%
209.85.174.%
209.85.175.%
209.85.176.%
209.85.177.%
209.85.178.%
209.85.179.%
209.85.180.%
209.85.181.%
209.85.182.%
209.85.183.%
209.85.184.%
209.85.185.%
209.85.186.%
209.85.187.%
209.85.188.%
209.85.189.%
209.85.190.%
209.85.191.%
209.85.192.%
209.85.193.%
209.85.194.%
209.85.195.%
209.85.196.%
209.85.197.%
209.85.198.%
209.85.199.%
209.85.200.%
209.85.201.%
209.85.202.%
209.85.203.%
209.85.204.%
209.85.205.%
209.85.206.%
209.85.207.%
209.85.208.%
209.85.209.%
209.85.210.%
209.85.211.%
209.85.212.%
209.85.213.%
209.85.214.%
209.85.215.%
209.85.216.%
209.85.217.%
209.85.218.%
209.85.219.%
209.85.220.%
209.85.221.%
209.85.222.%
209.85.223.%
209.85.224.%
209.85.225.%
209.85.226.%
209.85.227.%
209.85.228.%
209.85.229.%
209.85.230.%
209.85.231.%
209.85.232.%
209.85.233.%
209.85.234.%
209.85.235.%
209.85.236.%
209.85.237.%
209.85.238.%
209.85.239.%
209.85.240.%
209.85.241.%
209.85.242.%
209.85.243.%
209.85.244.%
209.85.245.%
209.85.246.%
209.85.247.%
209.85.248.%
209.85.249.%
209.85.250.%
209.85.251.%
209.85.252.%
209.85.253.%
209.85.254.%
216.239.32.%
216.239.33.%
216.239.34.%
216.239.35.%
216.239.36.%
216.239.37.%
216.239.38.%
216.239.39.%
216.239.40.%
216.239.41.%
216.239.42.%
216.239.43.%
216.239.44.%
216.239.45.%
216.239.46.%
216.239.47.%
216.239.48.%
216.239.49.%
216.239.50.%
216.239.51.%
216.239.52.%
216.239.53.%
216.239.54.%
216.239.55.%
216.239.56.%
216.239.57.%
216.239.58.%
216.239.59.%
216.239.60.%
216.239.61.%
216.239.62.%
Oday,
Your suggestion won't work as the IP ranges aren't all inclusive. Here is the list that Google says to whitelist.
As an example...how do I white list 64.18.0.x to 64.18.15.x
I should have looked harder in stackoverflow. For others that stumble upon this post, here is the answer that I found at
Whitelist IP addresses ranges using cPanel
64.18.0-15.%
64.233.160-191.%
64.102.0-15.%
66.249.80-95.%
72.14.192-255.%
74.125.%
173.194.%
207.126.144-159.%
209.85.128-255.%
216.239.32-63.%
This is long overdue, but the easiest solution is to use the % wildcard like this to make it easier:
64.18.%.%
64.233.%.%
66.102.%.%
...etc
Related
I am new to this and I want to parse the following log for a checkpoint firewall, I don't know if you can help me or guide me how I can do it so that I can see separate fields and not a single text
Ejemplo:
Source: -5:00
IP: XXX.XXX.XXX.XXX
Action: Accept
UUID= XXXX
....
-5:00 192.168.1.2 Action="accept" UUid="{0x61b22d19,0x4,0xf1137d7f,0xc0000000}" inzone="Internal" outzone="Internal" src="10.207.104.247" dst="10.207.106.9" proto="6" xlatesrc="186.5.16.83" NAT_rulenum="14" NAT_addtnl_rulenum="1" rule="21 (Incoming/Internal)" product="VPN-1 & FireWall-1" service="10050" s_port="38930
%{NUMBER}:00 %{IP} Action=%{QS} UUid=%{QS} inzone=%{QS} outzone=%{QS} src=%{QS} dst=%{QS} proto=%{QS} xlatesrc=%{QS} NAT_rulenum=%{QS} NAT_addtnl_rulenum=%{QS} rule=%{QS} product=%{QS} service=%{QS} s_port=%{QS}
I am trying the next grok but I am not getting what I want.
In the example you provided, a " is missing at the end, otherwise your grok pattern works for me.
You can add name to the fields so you can easily get them in graylog, for example:
%{NUMBER}:00 %{IP:ip} Action=%{QS:action} UUid=%{QS:uuid} inzone=%{QS:inzone} outzone=%{QS:outzone} src=%{QS:src} dst=%{QS:dst} proto=%{QS:proto} xlatesrc=%{QS:xlatesrc} NAT_rulenum=%{QS:natrulenum} NAT_addtnl_rulenum=%{QS:nataddtnlrulenum} rule=%{QS:rule} product=%{QS:product} service=%{QS:service} s_port=%{QS:sport}
I am trying to sort several csv files by the first column. Here is a an example of the output that I get:
OR7
OR8
OR10
OR100
OR101
OR102
OR103
OR104
OR105
OR106
OR107
OR109
OR11
OR111
OR113
OR114
OR115
OR117
OR119
Here is the command that I am using: sort -k 1.3,1.4n -k1.5n file (I am sorting by the first column)
However I would like to have it sorted like this:
OR7
OR8
OR10
OR11
OR100
OR101
OR102
OR103
OR104
OR105
OR106
OR107
OR109
OR111
OR113
OR114
OR115
OR117
OR119
I know that there are other similar questions here, but I could not figure out how to adapt their solution to my problem.
I am also using MacOS. I was just looking at an Ubuntu machine and the sort has more option (checking "man sort"). For example, when I try to use -V on my computer it does not work.
Thank you for your time.
Well I found a way around it in R. Since my goal was to make a Trellis plot. What I did was to set the column with the gene names as a factor and in the order I wanted. For example:
OR$Gene<-factor(OR$Gene, levels=(c("OR2", "OR3", "OR4", "OR5", "OR6", "OR7", "OR8", "OR10", "OR11", "OR12", "OR13", "OR14", "OR15", "OR16", "OR17", "OR18", "OR19", "OR20", "OR21", "OR23", "OR24", "OR25", "OR26", "OR27", "OR28", "OR30", "OR31", "OR33", "OR36", "OR39", "OR41", "OR42", "OR43", "OR44", "OR45", "OR47", "OR48", "OR49", "OR50", "OR52", "OR55", "OR56", "OR59", "OR62", "OR63", "OR66", "OR67", "OR69", "OR70", "OR71", "OR72", "OR76", "OR78", "OR79", "OR80", "OR81", "OR84", "OR85", "OR86", "OR87", "OR88", "OR91", "OR92", "OR93", "OR94", "OR95", "OR96", "OR97", "OR98", "OR100", "OR101", "OR102", "OR103", "OR104", "OR105", "OR106", "OR107", "OR109", "OR111", "OR113", "OR114", "OR115", "OR117", "OR119", "OR121", "OR122", "OR123", "OR124", "OR125", "OR126", "OR130"))
Then with the xyplot print command I used the index.cond:
index.cond = list(OR$Gene),
Well I got what I wanted, I am sure might be an easier way out there.
Best,
I have some data in a Custom Screen in Zabbix, and would like to pull the data from the screen via the API. I'm using this Ruby gem: https://github.com/express42/zabbixapi
I'm able to successfully connect and query, but the results I'm getting are not very useful:
p zbx.query(
:method => "item.get",
:params => {
:itemids => "66666",
:output => "extend"
}
)
# [{"itemid"=>"66666", "type"=>"0", "snmp_community"=>"", "snmp_oid"=>"", "hostid"=>"77777", "name"=>"Fro Packages", "key_"=>"system.sw.packages[davekey1|davekey2|davekey3|davekey4]", "delay"=>"300", "history"=>"90", "trends"=>"365", "status"=>"0", "value_type"=>"1", "trapper_hosts"=>"", "units"=>"", "multiplier"=>"0", "delta"=>"0", "snmpv3_securityname"=>"", "snmpv3_securitylevel"=>"0", "snmpv3_authpassphrase"=>"", "snmpv3_privpassphrase"=>"", "formula"=>"1", "error"=>"", "lastlogsize"=>"0", "logtimefmt"=>"", "templateid"=>"88888", "valuemapid"=>"0", "delay_flex"=>"", "params"=>"", "ipmi_sensor"=>"", "data_type"=>"0", "authtype"=>"0", "username"=>"", "password"=>"", "publickey"=>"", "privatekey"=>"", "mtime"=>"0", "flags"=>"0", "filter"=>"", "interfaceid"=>"25", "port"=>"", "description"=>"", "inventory_link"=>"0", "lifetime"=>"30", "snmpv3_authprotocol"=>"0", "snmpv3_privprotocol"=>"0", "state"=>"0", "snmpv3_contextname"=>""}]
You can see that it's returning a bunch of ID's for the items, including the correct keys, but I can't seem to get the actual plain text values, which is the data I'm interested in.
I started with the screen_id, then got the screenitem_id, now the item_id, but I don't seem to be getting any closer to what I want!
Thanks for any help
Getting items or getting hosts means getting their description, not the data. is You are after history. Reading the actual Zabbix user manual and API docs is highly recommended.
When testing Cocoa data detector I found that forecast.io isn't picked up but www.forecast.io and forecast.com are.
What are all the top level domains found by NSDataDetector without prefixing them with www.?
I wrote about how to pick an Apple friendly TLD and my findings are recounted below.
I just took the text file from ICANN and prepended all the extensions with 'example.' and the only ones detected at least in my locale(US) were these:
Uppercase:
example.com
example.EDU
example.EU
example.GOV
example.LY
example.NET
example.ORG
Lowercase:
example.ar
example.at
example.au
example.be
example.br
example.ca
example.ch
example.cn
example.de
example.dk
example.edu
example.es
example.eu
example.fi
example.fr
example.gov
example.gr
example.hk
example.hu
example.il
example.is
example.it
example.jp
example.kr
example.lu
example.ly
example.ma
example.mx
example.net
example.nl
example.no
example.nz
example.org
example.pt
example.ru
example.se
example.sg
example.th
example.tn
example.tr
example.tw
example.ua
example.uk
example.us
From my own testing, it looks like anything with www. on the front will be detected.
As an update to Steve's answer, here are the lowercased tld's that were detected for me, as of Nov 1, 2016:
example.ar
example.at
example.au
example.cc
example.ch
example.cn
example.co
example.com
example.de
example.dk
example.edu
example.es
example.eu
example.fi
example.fm
example.fr
example.gov
example.gr
example.hk
example.hr
example.hu
example.ie
example.il
example.info
example.io
example.is
example.it
example.kr
example.lu
example.ly
example.ma
example.me
example.mx
example.net
example.nl
example.no
example.nz
example.org
example.pt
example.pw
example.rs
example.ru
example.se
example.sg
example.si
example.th
example.tn
example.tr
example.tw
example.ua
example.uk
example.us
Here is my setup, a bit changed standard edition.
# app/config/routing.yml
_internal:
resource: "#AcmeDemoBundle/Controller/"
prefix: /{_locale}
requirements:
_locale: en|sr
And added /{_locale} in security.yml.
Routes before:
Name Method Pattern
_welcome ANY /
_demo_login ANY /demo/secured/login
_security_check ANY /demo/secured/login_check
_demo_logout ANY /demo/secured/logout
acme_demo_secured_hello ANY /demo/secured/hello
_demo_secured_hello ANY /demo/secured/hello/{name}
_demo_secured_hello_admin ANY /demo/secured/hello/admin/{name}
_demo ANY /demo/
_demo_hello ANY /demo/hello/{name}
_demo_contact ANY /demo/contact
_wdt ANY /_wdt/{token}
_profiler_search ANY /_profiler/search
_profiler_purge ANY /_profiler/purge
_profiler_import ANY /_profiler/import
_profiler_export ANY /_profiler/export/{token}.txt
_profiler_search_results ANY /_profiler/{token}/search/results
_profiler ANY /_profiler/{token}
_configurator_home ANY /_configurator/
_configurator_step ANY /_configurator/step/{index}
_configurator_final ANY /_configurator/final
Routes after:
Name Method Pattern
_welcome ANY /
_wdt ANY /_wdt/{token}
_profiler_search ANY /_profiler/search
_profiler_purge ANY /_profiler/purge
_profiler_import ANY /_profiler/import
_profiler_export ANY /_profiler/export/{token}.txt
_profiler_search_results ANY /_profiler/{token}/search/results
_profiler ANY /_profiler/{token}
_configurator_home ANY /_configurator/
_configurator_step ANY /_configurator/step/{index}
_configurator_final ANY /_configurator/final
_demo_login ANY /{_locale}/demo/secured/login
_security_check ANY /{_locale}/demo/secured/login_check
_demo_logout ANY /{_locale}/demo/secured/logout
acme_demo_secured_hello ANY /{_locale}/demo/secured/hello
_demo_secured_hello ANY /{_locale}/demo/secured/hello/{name}
_demo_secured_hello_admin ANY /{_locale}/demo/secured/hello/admin/{name}
_demo ANY /{_locale}/
_demo_hello ANY /{_locale}/hello/{name}
_demo_contact ANY /{_locale}/contact
Which ofc leads to No route found for "GET /en/demo/hello/World" for /en/demo/hello/World url.
Any idea how to fix this?
Additionally, I would like to implement per domain locale. I was trying https://github.com/schmittjoh/JMSI18nRoutingBundle, but for some reason it does not work with latest Symfony 2.0.9, at least for me. I was following the doc, but I got similar 404 error when trying prefixed urls.
Defining default values and requirements for placeholders in prefix is not possible in Symfony version 2.0.9. You'd have to upgrade to 2.1, which is currently in active development.