fwvpnclass2005b.ppt

381 views
315 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
381
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

fwvpnclass2005b.ppt

  1. 1. Living Behind Administrative Firewalls at Stanford: A Survival Guide August 5, 2005 2-4 pm, Turing Auditorium Sunia Yang [email_address] Networking Systems
  2. 2. Topics <ul><li>Security by protocol stack </li></ul><ul><ul><li>What's a firewall? </li></ul></ul><ul><ul><li>What's a vpn? </li></ul></ul><ul><ul><li>How secure are we? </li></ul></ul><ul><li>Stanford's deployment of firewalls and vpns </li></ul><ul><ul><li>How to get behind a firewall </li></ul></ul><ul><ul><li>How to add/change/delete rules </li></ul></ul><ul><li>Troubleshooting </li></ul><ul><li>Requesting rules - exercise (50 min) </li></ul>
  3. 3. Firewalls at Stanford <ul><li>Everyone, especially sys admins and application folks, behind a firewall has to learn more about networking </li></ul><ul><li>Networking folks have to learn more about systems and applications </li></ul><ul><li>More process required- audit/authorization trail </li></ul>
  4. 4. Living with Firewalls- Mantras <ul><li>&quot;Know Thy Network Traffic&quot; </li></ul><ul><ul><li>If you don't know it now, you're going to learn it the hard way </li></ul></ul><ul><li>&quot;Know Thy Servers&quot; </li></ul><ul><ul><li>ditto </li></ul></ul>
  5. 5. Security by Protocol Stack <ul><li>Firewalls and VPNs are just part of a total security approach </li></ul><ul><ul><li>Firewall would not have caught bugbear-b virus </li></ul></ul><ul><ul><li>Perimeter firewall or user vpn client would not have prevented Windows RPC, Agobot, Sasser </li></ul></ul>
  6. 6. Physical Layer Security <ul><li>&quot;If you can touch it, you can hack it&quot; </li></ul><ul><ul><li>Lock up servers, network closets </li></ul></ul><ul><li>Wireless- major physical security risk </li></ul><ul><ul><li>firewall defeated if wireless behind firewall </li></ul></ul><ul><ul><li>allowing unencrypted wireless session through firewall defeats data security </li></ul></ul>
  7. 7. Data layer <ul><li>Switches as security device </li></ul><ul><ul><li>isolates conversations- sniffer protection </li></ul></ul><ul><ul><ul><li>may misbehave and &quot;leak&quot; </li></ul></ul></ul><ul><ul><li>block by hardware address </li></ul></ul><ul><ul><ul><li>not possible in all switches </li></ul></ul></ul><ul><ul><li>hardcode hw address to port- tedious, unscalable </li></ul></ul>
  8. 8. Network/Transport Layers <ul><li>Filter traffic by IP addresses and ports </li></ul><ul><ul><li>Router ACLs (may be leaky) </li></ul></ul><ul><ul><li>Firewalls (hardware, software) </li></ul></ul><ul><ul><li>Host IP filters </li></ul></ul><ul><li>Require secure (not clear text) protocols or vpn </li></ul><ul><ul><li>data encrypted (ssl, ssh) </li></ul></ul><ul><ul><li>encrypted data could still be virus or worm </li></ul></ul>
  9. 9. Perimeter vs Server vs Dept &quot;Firewalls&quot; <ul><li>Perimeter- at SUNet boundaries </li></ul><ul><ul><li>Protect entire network at boundary </li></ul></ul><ul><ul><ul><li>SUNet uses Routers and Packetshapers </li></ul></ul></ul><ul><ul><li>SUNet leaves most ports open, only blocking particularly vulnerable ports (Windows, backdoors) </li></ul></ul><ul><ul><li>Guard mostly against worms/viruses/script kiddies </li></ul></ul><ul><ul><li>Does not guard against internal hacked machines </li></ul></ul><ul><li>Server- protect essential data/services </li></ul><ul><ul><li>Block all unused ports </li></ul></ul><ul><li>Departmental- at the network boundary </li></ul><ul><ul><li>still working out what we can support </li></ul></ul>
  10. 10. Application Layer <ul><li>Very critical layer for security- starts in the design </li></ul><ul><ul><li>good architecture- 3 tier (separate web, app, db) </li></ul></ul><ul><ul><li>no group accounts </li></ul></ul><ul><ul><li>good passwords </li></ul></ul><ul><ul><li>secure transports- no cleartext data or passwords </li></ul></ul><ul><ul><li>critical data only on secured hosts (workstations!!!) </li></ul></ul><ul><ul><li>separate production and development (data, too!) </li></ul></ul><ul><li>Good sys admins </li></ul><ul><ul><li>patch, antivirus-software </li></ul></ul><ul><ul><li>turnoff unused services </li></ul></ul><ul><li>Monitoring- </li></ul><ul><ul><li>how to detect compromise </li></ul></ul>
  11. 11. User/Political Layer <ul><li>The most important security layer </li></ul><ul><li>Political </li></ul><ul><ul><li>Policy and mandate </li></ul></ul><ul><ul><li>Funding </li></ul></ul><ul><ul><li>Enforcement </li></ul></ul><ul><li>User </li></ul><ul><ul><li># 1 risk- disgruntled employees </li></ul></ul><ul><ul><li>data on workstations </li></ul></ul><ul><ul><li>bad passwords </li></ul></ul><ul><ul><li>usage - laptops, wireless, patching, AV </li></ul></ul>
  12. 12. How secure are we and why do we care? <ul><li>Computer security is among top financial risks to Stanford </li></ul><ul><ul><li>loss of data and reputation </li></ul></ul><ul><ul><li>cost of cleaning hacked machines </li></ul></ul><ul><ul><li>legal liability- Hipaa (medical), Ferpa (student) </li></ul></ul><ul><li>Audit reports are grim </li></ul><ul><ul><li>many security issues at application layer </li></ul></ul>
  13. 13. What is a firewall? <ul><li>Network/transport layer </li></ul><ul><li>Passes traffic based on these basic criteria: </li></ul><ul><ul><li>source IP </li></ul></ul><ul><ul><li>destination IP </li></ul></ul><ul><ul><li>destination port </li></ul></ul><ul><ul><li>session status- initiation, timeout </li></ul></ul><ul><li>Generally, default is block everything </li></ul>
  14. 14. Why firewalls/vpns? <ul><li>Physical and data layer security is critical </li></ul><ul><ul><li>mostly implemented already (except wireless) </li></ul></ul><ul><li>Too many badly architected apps on market </li></ul><ul><ul><li>many assume perimeter and server firewalls </li></ul></ul><ul><li>Often best return of security for given staff, time and money </li></ul>
  15. 15. Firewall Issues <ul><li>No security on opened ports </li></ul><ul><li>Manageable rule set vs. many exceptions </li></ul><ul><li>Hard to secure port-hopping apps- VPN instead </li></ul><ul><li>Session timeout limits </li></ul><ul><li>Hosts are unprotected from hacked hosts behind firewall ( want personal firewall!!) </li></ul>
  16. 16. What is a vpn? <ul><li>Network/transport layer </li></ul><ul><li>Establish session between two devices </li></ul><ul><ul><li>vpn client and vpn server/concentrator </li></ul></ul><ul><ul><li>two firewalls </li></ul></ul><ul><li>Encrypt traffic- secure cleartext traffic </li></ul><ul><li>Another layer of authentication/authorization </li></ul>
  17. 17. VPN Pros <ul><li>With limited staff time and money, may get some application layer security </li></ul><ul><li>Sometimes can be used to enforce patch level of client operating systems </li></ul>
  18. 18. VPN Cons <ul><li>May break IP dependent services </li></ul><ul><li>Inconvenient- processing overhead </li></ul><ul><li>Most vpn clients incompatible with each other </li></ul><ul><li>Incomplete security- allows encrypted path for hacker </li></ul><ul><li>Cost of vpn client support </li></ul>
  19. 19. VPN - Split Tunnel <ul><li>only traffic to specific servers is encrypted </li></ul><ul><li>pros- performance </li></ul><ul><ul><li>less encryption overhead </li></ul></ul><ul><ul><li>less traffic to central VPN concentrator </li></ul></ul><ul><li>cons- security </li></ul><ul><ul><li>if client host is hacked, hacker can control VPN session </li></ul></ul><ul><li>no split tunnel allowed for admin apps </li></ul>
  20. 20. Stanford Public Vpn <ul><li>Allows split tunnel </li></ul><ul><li>Two main uses: </li></ul><ul><li>access Windows svrs from outside </li></ul><ul><li>get Stanford IP for authorization </li></ul>VPN Client su-vpn Library Resources Windows svr SUNet google.com
  21. 21. Stanford Admin Vpn No split tunnel allowed Mainly to access firewalled servers VPN Client firewall vpnap google server firewall www.stanford.edu
  22. 22. General Steps For Firewall Design <ul><li>Design topology </li></ul><ul><li>Firewall Rules </li></ul><ul><li>Enforce rules </li></ul><ul><li>Monitor, document, audit (not in this class) </li></ul><ul><li>Troubleshooting </li></ul>
  23. 23. Firewall Process at Stanford <ul><li>Process tries to make things easier but auditable </li></ul><ul><li>Contact firewall team (firewall-team@lists ASAP </li></ul><ul><li>Fill out form + application layout </li></ul><ul><li>Meet and design topology </li></ul><ul><li>Order hardware, cables </li></ul><ul><li>Move behind firewall </li></ul><ul><li>Rule requests and approval </li></ul><ul><li>VPN access </li></ul><ul><li>SLA and charges </li></ul><ul><li>https://www.stanford.edu/group/networking/fwmaps/service_site/ </li></ul>
  24. 24. New Firewall Form <ul><li>form gives list of the process and required information </li></ul><ul><li>application diagram </li></ul><ul><ul><li>hosts and required ports </li></ul></ul><ul><ul><li>transport between hosts </li></ul></ul><ul><ul><li>where's the data? </li></ul></ul><ul><li>what trying to protect- hosts, data, service </li></ul>
  25. 25. r s - v p n c l i e n t S t a n f o r d u s e r - a n y w h e r e S t a n f o r d u s e r - a n y w h e r e O d d A p p l i c a t i o n P o r t 8 5 7 2 O d d 1 O d d U s e r s C i t r i x 1 C i t r i x A p p C i t r i x U s e r s E v e r y A r r o w P o i n t i s A n o t h e r R u l e ! P r o d u c t i o n A p p S e r v i c e - P o r t 4 5 7 2 P r o d u c t i o n W e b S e r v i c e - P o r t 4 4 3 P r o d u c t i o n D a t a b a s e - P o r t 1 5 2 1 D e v e l o p m e n t W e b S e r v i c e - P o r t 8 8 P r o d u c t i o n W e b S e r v i c e - P o r t 4 4 3 W e b 2 W e b 1 P r o d u c t i o n A p p S e r v i c e - P o r t 4 5 7 2 D e v e l o p m e n t A p p S e r v i c e - P o r t 4 5 7 3 D e v e l o p m e n t D a t a b a s e - P o r t 1 5 6 0 T r a i n i n g D a t a b a s e - P o r t 1 5 5 0 A p p 1 A p p 2 D B 1 D B 2 A p p l i c a t i o n A r c h i t e c t u r e D i a g r a m - d r a s t i c a l l y s i m p l i f i e d D e v e l o p e
  26. 26. Meeting and Design <ul><li>meet with someone from firewall team and information security </li></ul><ul><li>review form, application diagram, transports, data </li></ul><ul><li>propose initial firewall topology and schedule install </li></ul>
  27. 27. Laying out Firewall Topology <ul><li>Group servers by </li></ul><ul><ul><li>Sensitivity and type of data </li></ul></ul><ul><ul><li>Security level (don't put petty cash in the safe) </li></ul></ul><ul><ul><li>Production vs development </li></ul></ul><ul><ul><ul><li>Especially as projects are out-sourced, don't want our data somewhere else in the world </li></ul></ul></ul><ul><ul><li>Separate web from app/db layers </li></ul></ul><ul><li>Sharing switches </li></ul><ul><ul><li>Generally, databases or servers actually holding data should be on separate switch (no VLANs) </li></ul></ul>
  28. 28. Basic Firewall Topology FW = firewall SW = switch S = server FW1 S1 S2 S3 SW2 S7 S8 S9 Zone 2 Ex. Web Servers Zone 4 Ex. Database Servers Zone 1 Firewall can only filter between zones by IP address and port Applications often use a well-known port S4 S5 S6 Zone 3 Ex. App Servers vlan 20 vlan 30 SW1
  29. 29. Routing vs Transparent FWs <ul><li>Routing FWs </li></ul><ul><ul><li>extra security because of layer 3 separation </li></ul></ul><ul><ul><li>standard for server firewalls </li></ul></ul><ul><li>Transparent FWs </li></ul><ul><ul><li>standard for departmental firewalls </li></ul></ul><ul><ul><li>acts like a switch </li></ul></ul>
  30. 30. Ordering <ul><li>firewalls- currently using Juniper/Netscreen </li></ul><ul><li>switches </li></ul><ul><li>cabling if in machine room </li></ul><ul><ul><li>fwteam assigns switch ports for servers </li></ul></ul><ul><ul><li>sysadmin requests cabling from machine room infrastructure support through HelpSU </li></ul></ul>
  31. 31. Server Moves <ul><li>usually firewall is in routing mode </li></ul><ul><li>fw team notifies project owner that firewall ready </li></ul><ul><li>sys admin moves server behind firewall by unplugging old cable and putting in new cable. Sys admin also takes care of any needed NetDB changes if renumbering server </li></ul>
  32. 32. Rule Request Form <ul><li>Ideally request initial rules before move </li></ul><ul><li>Template rules = set of commonly requested rules </li></ul><ul><ul><li>backup </li></ul></ul><ul><ul><li>windows administration </li></ul></ul><ul><ul><li>solaris administration </li></ul></ul><ul><ul><li>linux administration </li></ul></ul><ul><ul><li>database administration </li></ul></ul><ul><li>Rule request form </li></ul><ul><ul><li>https://tools.stanford.edu/cgi-bin/firewall-request </li></ul></ul><ul><ul><li>reminder of required fields </li></ul></ul><ul><ul><li>archived for audit purposes </li></ul></ul><ul><li>Requesters/approvers designated by app owner </li></ul>
  33. 33. Firewall Rules- Part 1 <ul><li>Rule requires the following pieces: </li></ul><ul><li>Action : Permit, Deny </li></ul><ul><li>Source IPs : Client, VPN Client, Admin </li></ul><ul><li>Destination IPs: Servers </li></ul><ul><li>Destination Port: 80(web), 25(smtp), etc. </li></ul><ul><li>Port Type : tcp, udp </li></ul>
  34. 34. Firewall Rules- Part 2 Examples: Allow 10.0.1.5 to 171.64.7.77 on udp port 53 (DNS) Allow 10.0.1.0/24 to 10.0.2.10 on tcp port 25 (SMTP) Deny 10.0.1.0/24 to any on tcp port 25 (SMTP) Sources: servers, clients, vpn clients, hackers (remember the last one when you are writing rules!!!!)
  35. 35. Types of Rules - Part 1 <ul><li>Basic host functions - in template </li></ul><ul><ul><li>DNS, NTP, ping </li></ul></ul><ul><li>Remote host admin- mostly in template </li></ul><ul><ul><li>Monitoring – snmp, email, icmp </li></ul></ul><ul><ul><li>Remote session - ssh, citrix </li></ul></ul><ul><ul><li>Authentication - sident, kerberos, MS auth </li></ul></ul><ul><ul><li>Maintenance - upgrades, virus, rebuilds, backup, file transfer </li></ul></ul><ul><ul><li>Central systems –Microsoft domains/AD, afs, nfs </li></ul></ul>
  36. 36. Types of Rules - Part 2 <ul><li>Application specific </li></ul><ul><ul><li>Client: Web services, front end ports </li></ul></ul><ul><ul><li>Server to server: db sharing, file transfer, app to db </li></ul></ul><ul><li>Development </li></ul><ul><ul><li>Environments- training, development, etc </li></ul></ul><ul><ul><li>Server to server: db sharing, file transfer, app to db </li></ul></ul><ul><ul><li>Application build </li></ul></ul><ul><ul><li>Developer access- in-house, remote </li></ul></ul>
  37. 37. VPN access <ul><li>traffic from sysadmin or application folks to servers should be over secure transports or over vpn (unencrypted SQL, etc) </li></ul><ul><li>authorization set by workgroups </li></ul><ul><li>app owner sets membership with Workgroup Manager ( http://workgroup.stanford.edu ) </li></ul><ul><li>currently, delegated vpn approver must send email to firewall-team to activate vpn account </li></ul>
  38. 38. Troubleshooting <ul><li>A can't reach B which is behind firewall </li></ul><ul><ul><li>Try ping first (allowed by default at Stanford on FWs) </li></ul></ul><ul><ul><ul><li>If fails, check IP addr, physical connection </li></ul></ul></ul><ul><ul><li>Try telnet to desired port </li></ul></ul><ul><ul><ul><li>If okay, then not a firewall issue- probably app layer </li></ul></ul></ul><ul><ul><ul><ul><li>Message like &quot;Connected to B&quot; </li></ul></ul></ul></ul><ul><ul><ul><li>If fails, depends on message: </li></ul></ul></ul><ul><ul><ul><ul><li>&quot;Connection closed by foreign host&quot; or &quot;Connection refused&quot; means B rejects A </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Hangs with message &quot;Trying B&quot;, finally getting message like &quot;Unable to connect to remote host: timed out&quot; means that port is not reachable- possibly firewall </li></ul></ul></ul></ul><ul><ul><li>Run &quot;netstat&quot; on B to see if ports are open </li></ul></ul><ul><ul><li>Ask us to log- see if traffic is coming thru or blocked </li></ul></ul>
  39. 39. Common Problems <ul><li>~80% requests to check firewall show that firewall is not the problem </li></ul><ul><li>~10% of time, previously unknown traffic (&quot;know thy app&quot;) has no appropriate rule </li></ul><ul><li>Typos, miscommunication </li></ul><ul><li>Extra filtering on host itself </li></ul><ul><li>Host IP changes, thus breaking rule </li></ul>
  40. 40. Exercise Goals <ul><li>understand firewall terms </li></ul><ul><li>understand how to construct a rule </li></ul><ul><li>understand the types of rules </li></ul><ul><li>understand how topology affects rule requests </li></ul>
  41. 41. r s - v p n c l i e n t S t a n f o r d u s e r - a n y w h e r e S t a n f o r d u s e r - a n y w h e r e O d d A p p l i c a t i o n P o r t 8 5 7 2 O d d 1 O d d U s e r s C i t r i x 1 C i t r i x A p p C i t r i x U s e r s E v e r y A r r o w P o i n t i s A n o t h e r R u l e ! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 P r o d u c t i o n A p p S e r v i c e - P o r t 4 5 7 2 P r o d u c t i o n W e b S e r v i c e - P o r t 4 4 3 P r o d u c t i o n D a t a b a s e - P o r t 1 5 2 1 D e v e l o p m e n t W e b S e r v i c e - P o r t 8 8 P r o d u c t i o n W e b S e r v i c e - P o r t 4 4 3 W e b 2 W e b 1 P r o d u c t i o n A p p S e r v i c e - P o r t 4 5 7 2 D e v e l o p m e n t A p p S e r v i c e - P o r t 4 5 7 3 D e v e l o p m e n t D a t a b a s e - P o r t 1 5 6 0 T r a i n i n g D a t a b a s e - P o r t 1 5 5 0 A p p 1 A p p 2 D B 1 D B 2 A p p l i c a t i o n A r c h i t e c t u r e D i a g r a m - d r a s t i c a l l y s i m p l i f i e d D e v e l o p e
  42. 42. t A n y h o s t a f s s v r s 2 0 0 . 0 . 5 . 0 / 2 4 E v e r y A r r o w P o i n t i s A n o t h e r R u l e ! p i n g - I C M P p i n g - I C M P a f s m o u n t s B a s t i o n s s h - p o r t 2 2 U n i x S e r v e r s W i n d o w s S e r v e r s N e t w o r k D e v i c e s S y s A d m i n s t e r m i n a l s v c s 21 37 22 23 24 25 26 27 28 29 30 31 33 35 32 W e b 2 W e b 1 A p p 1 A p p 2 D B 1 D B 2 S y s t e m A d m i n i s t r a t i o n & D e v e l o p m e n t D i a g r a m ( g r e a t l y s i m p l i f i e d ) C i t r i x 1 O d d 1 M a i l S e r v e r 2 0 0 . 0 . 1 . 5 M o n i t o r i n g S e r v e r 2 0 0 . 0 . 3 . 1 1 W i n d o w s P D C s - 2 0 0 . 0 . 0 . 2 0 2 0 0 . 0 . 0 . 3 0 S y s A d m i n s s s h - p o r t 2 2 s m t p - p o r t 2 5 w i n d o w s p o r t s - 1 3 5 , 1 3 7 , 1 3 8 , 1 3 9 , 4 4 5 s m t p - p o r t 2 5 S w i t c h 1 S w i t c h 2 S w i t c h 3 F w A d m i n s t e l n e t / s s h D N S s v r s T i m e s v r s 2 0 0 . 0 . 2 . 9 p i n g - I C M P p i n g - I C M P p i n g - I C M P A n y h o s
  43. 43. . 6 / 2 4 P D C s W i r e l e s s U s e r M o n i t o r i n g M a i l S v r s a f s / n f s s v r s D e v e l o p e r 2 0 0 . 0 . 2 . 9 2 0 0 . 0 . 5 . 0 / 2 4 2 0 0 . 0 . 1 . 5 2 0 0 . 0 . 3 . 1 1 2 0 0 . 0 . 0 . 2 0 2 0 0 . 0 . 0 . 3 0 D e v e l o p e r B a s t i o n H o s t 1 0 . 0 . 4 . 1 / 2 4 1 0 . 0 . 4 . 2 / 2 4 S y s A d m i n S y s A d m i n F i r e w a l l D B 1 R o u t e r A p p 2 W e b 1 A p p 1 D B 2 W e b 2 S w i t c h 1 S w i t c h 2 S w i t c h 3 1 0 . 0 . 0 . 1 / 2 4 1 0 . 0 . 0 . 2 / 2 4 1 0 . 0 . 1 . 1 / 2 4 1 0 . 0 . 2 . 1 / 2 4 1 0 . 0 . 3 . 1 / 2 4 1 0 . 0 . 1 . 2 / 2 4 1 0 . 0 . 2 . 2 / 2 4 1 0 . 0 . 3 . 2 / 2 4 1 0 . 0 . 1 . 3 / 2 4 1 0 . 0 . 1 . 4 / 2 4 1 0 . 0 . 2 . 3 / 2 4 1 0 . 0 . 2 . 4 / 2 4 1 0 . 0 . 3 . 3 / 2 4 1 0 . 0 . 3 . 4 / 2 4 S U N e t I n t e r n e t U s e r V P N C l i e n t s H a c k e r H a c k e r W i r e d U s e r D N S / N T P N e t w o r k T o p o l o g y 1 0 . 0 . 1 0 0 . 6 4 - 1 0 . 0 . 1 0 0 . 1 2 6 C i t r i x 1 1 0 . 0 . 3 . 5 / 2 4 Z o n e = W e b Z o n e = A p p Z o n e = D B O d d 1 1 0 . 0 . 3

×