iptables-yum-proxy 293 B

1234567891011121314151617
  1. #!/bin/sh
  2. if [ "$1" == "start" ]; then
  3. CMD="-I"
  4. else
  5. # Remove rules
  6. CMD="-D"
  7. fi
  8. cat <<__EOF__ | iptables-restore -n
  9. *filter
  10. $CMD INPUT -i vif+ -p tcp --dport 8082 -j ACCEPT
  11. COMMIT
  12. *nat
  13. $CMD PR-QBS-SERVICES -i vif+ -d 10.137.255.254 -p tcp --dport 8082 -j REDIRECT
  14. COMMIT
  15. __EOF__