Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. ipset create db_allow hash:ip counters timeout 3600
  2.  
  3. # pass connections from allowed addresses in db_allow ipset
  4. iptables -A INPUT -p tcp --dport 3306 -m match-set --set db_allow src -j ACCEPT
  5. # block connections from other addresses
  6. iptables -A INPUT -p tcp --dport 3306 -j DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement