Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Firewall Also Gazes Into You

The Firewall Also Gazes Into You

Firewalls: turns out they're still useful. Lightning talk on what firewalls have to offer the typical web developer, and how to set one up on your server without hating your life.

Avatar for Ian Young

Ian Young

May 01, 2014
Tweet

More Decks by Ian Young

Other Decks in Programming

Transcript

  1. Redis Local connections possible, off by default Authentication possible, off

    by default Redis is open to the world by default It too offers weak authentication
  2. Firewalls that don't suck Default to DENY Assume every machine

    is public Simple firewall on each machine
  3. ufw

  4. Chef f i r e w a l l '

    u f w ' d o a c t i o n : e n a b l e e n d
  5. Chef f i r e w a l l _

    r u l e ' d e f a u l t ' d o a c t i o n : d e n y e n d
  6. Chef f i r e w a l l _

    r u l e ' s s h ' d o p o r t 2 2 a c t i o n : a l l o w e n d
  7. Chef f i r e w a l l _

    r u l e ' h t t p ' d o p o r t 8 0 p r o t o c o l : t c p a c t i o n : a l l o w e n d
  8. Ansible n a m e : i n s t

    a l l u f w a p t : p k g = u f w s t a t e = p r e s e n t
  9. Ansible n a m e : e n a b

    l e f i r e w a l l u f w : s t a t e = e n a b l e d p o l i c y = d e n y
  10. Ansible n a m e : p a s s

    H T T P t h r o u g h f i r e w a l l u f w : r u l e = a l l o w p o r t = 8 0 p r o t o = t c p
  11. Ansible n a m e : p a s s

    S S H t h r o u g h f i r e w a l l u f w : r u l e = a l l o w n a m e = O p e n S S H
  12. Rate limiting n a m e : p a s

    s S S H t h r o u g h f i r e w a l l u f w : r u l e = l i m i t n a m e = O p e n S S H
  13. Fin