cat file.json | jq -c '.hits.hits[] | { index: {_index:._index, _type:._type, _id:._id}}, ._source' | curl -XPOST -H "Content-Type: application/x-ndjson" localhost:9200/_bulk --data-binary @- | jq .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 10.0.4.172:3306 | |
iptables -A FORWARD -p tcp -d 10.0.4.172 --dport 3306 -j ACCEPT | |
iptables -t nat -A POSTROUTING -j MASQUERADE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:0Wc: | |
| env python mail_receiver.py |