Files for building MongoDB docker container.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
585B

  1. #!/bin/bash
  2. #
  3. # Run this on the server -
  4. # either the server that runs stunnel,
  5. # or the server that runs the docker stunnel container.
  6. function usage {
  7. echo ""
  8. echo "open_fw.sh script:"
  9. echo "opens the firewall to a particular port using iptables."
  10. echo "specify a port number for the firewall to open:"
  11. echo ""
  12. echo " ./open_fw.sh 666"
  13. echo ""
  14. }
  15. if [[ "$#" -ne 1 || $1 =~ "[0-9]\{1,5\}" ]];
  16. then
  17. usage
  18. else
  19. iptables -A INPUT -p tcp --dport ${1} -j ACCEPT
  20. iptables -A FORWARD -p tcp -j ACCEPT --dport ${1} -m state --state NEW
  21. fi