Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
仅允许使用iptables的http PUT请求_Http_Get_Couchdb_Iptables_Put - Fatal编程技术网

仅允许使用iptables的http PUT请求

仅允许使用iptables的http PUT请求,http,get,couchdb,iptables,put,Http,Get,Couchdb,Iptables,Put,我想允许从特定接口(例如eth2)建立连接,只向我的数据库发出http PUT请求,而不获取请求。使用iptables可以吗?您可以尝试…: iptables -I INPUT -d 192.168.0.100 -p tcp --dport 5984 -m string --string 'GET /' --algo bm -j DROP iptables -I INPUT -d 192.168.0.100 -p tcp --dport 5984 -m string --string 'PUT

我想允许从特定接口(例如eth2)建立连接,只向我的数据库发出http PUT请求,而不获取请求。使用iptables可以吗?

您可以尝试…:

iptables -I INPUT -d 192.168.0.100 -p tcp --dport 5984 -m string --string 'GET /' --algo bm -j DROP
iptables -I INPUT -d 192.168.0.100 -p tcp --dport 5984 -m string --string 'PUT /' --algo bm -j ACCEPT
…但风险自负-iptables不是HTTP过滤的最佳工具。更好地在CouchDB前面设置真正的HTTP代理,如Nginx,以便对您收到的所有HTTP请求进行更灵活和最佳的控制。

您可以尝试…:

iptables -I INPUT -d 192.168.0.100 -p tcp --dport 5984 -m string --string 'GET /' --algo bm -j DROP
iptables -I INPUT -d 192.168.0.100 -p tcp --dport 5984 -m string --string 'PUT /' --algo bm -j ACCEPT

…但风险自负-iptables不是HTTP过滤的最佳工具。更好地在CouchDB前面设置真正的HTTP代理,如Nginx,以便对您接收的所有HTTP请求进行更灵活和最佳的控制。

不太可能。iptables与通过套接字传递的实际数据无关。不太可能。iptables本身并不关心通过套接字传递的实际数据。