I’m trying to configure RoR on two separate master nodes on multinode cluster as follows:
(1)allow any request (read/write/manage, etc.) on localhost ONLY, forbid requests from particular servers/IPs
(2)allow any request (read/write/manage, etc.) from particular servers/IPs ONLY, forbid requests on localhost
Environment: RHEL 6, ES 5.6.3, readonlyrest_1.16.15_es5.6.3
For (1) my readonlyrest.yml:
readonlyrest: enable: true response_if_req_forbidden: Access denied by RoR access_control_rules: - name: "Allow requests from localhost only" hosts: [127.0.0.1]
Running cURL -XGET ‘http://184.108.40.206:9200/books/kindle/1?pretty’ on localhost or on another host rejects request with returned status 403. Here 220.127.116.11:9200 is the IP:port where the RoR is deployed.
Running cURL -XGET ‘http://127.0.0.1:9200/books/kindle/1?pretty’ on localhost returns “curl: (7)couldn’t connect to host”
Any advise how to implement these two use cases ?
Thanks in advance.