Guest User

Untitled

a guest
Apr 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. iptables-restore <<-_eof;
  2. -A INPUT
  3. -p tcp
  4. -m tcp
  5. --dport 80
  6. --tcp-flags FIN,SYN,RST,ACK SYN
  7. -m connlimit
  8. --connlimit-above 20
  9. --connlimit-mask 24
  10. -j REJECT
  11. --reject-with tcp-reset
  12. _eof
  13.  
  14. This is how I want to write iptables rules, but does not work, since iptables-restore
  15. does not allow \n
  16.  
  17. would it be possible to do something hacky like:
  18.  
  19. -A INPUT $(..?
  20. -p tcp
  21. ...
  22. )
  23.  
  24. and make it look like a oneliner for iptables-restore..?
Add Comment
Please, Sign In to add comment