home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / dcom / sys / cisco / 2074 < prev    next >
Encoding:
Text File  |  1993-01-26  |  5.3 KB  |  115 lines

  1. Newsgroups: comp.dcom.sys.cisco
  2. Path: sparky!uunet!boulder!recnews
  3. From: John Bashinski <jbash@cisco.com>
  4. Subject: Re: ACLs 
  5. In-Reply-To: Your message of "Mon, 25 Jan 93 23:09:03 GMT."
  6.              <C1FMz4.I4n@cantua.canterbury.ac.nz> 
  7. Message-ID: <728032083.2859@news.Colorado.EDU>
  8. Sender: news
  9. Date: 25 Jan 93 21:39:45 -0800
  10. Approved: news
  11. X-Note1: message-id generated by recnews
  12. X-Note2: mail msgid was   <9301260539.AA05885@wolf.cisco.com>
  13. Lines: 100
  14.  
  15. > Currently I have configured our cisco (which is the gateway) to let anyone
  16. > talk to this host on the nntp port, and on any port over 1000 - and visa
  17. > versa for connections from the other direction. This works fine, but means
  18. > that the node is still open for connections over 1000 - which I don't want.
  19. > (just enabling port 119 isn't enough as there are two ports to every
  20. > connection)
  21. > Is there any other ACL set I could use to ensure that _only_ connections
  22. > to .OR. from port nntp were allowed? 
  23.  
  24. Let me restate the requirement to make sure I understand it. You want to
  25. allow incoming connections only to port 119 on this machine (from any port
  26. on a remote machine), and outgoing connections from this machine only to
  27. port 119 on remote machines. Presumably the incoming restriction is to
  28. protect yourself from ne'er-do-wells on the Internet, and the outgoing
  29. restriction is to protect the Internet from similar ne'er-do-wells inside
  30. your site.
  31.  
  32. You can do this with the "established" keyword. What "established" does on
  33. an extended access list entry is to let that entry match any packet that's
  34. part of an already-created TCP connection, but not any packet that could
  35. serve to create a new connection. It does this by examining the SYN and RST
  36. bits in the TCP header.
  37.  
  38. Suppose your internal net is on Ethernet 0, and the outside world is on
  39. Serial 0. Your NNTP host has address 1.2.3.4. You're using access list 101
  40. on Ethernet 0, and access 102 on serial 0. A partial view of your
  41. configuration file might look like this (untested) example:
  42.  
  43. ! Access list 101 is applied to traffic coming in from the outside world
  44. ! to the internal network.
  45. !
  46. ! The first entry lets our local machine connect to NNTP ports in
  47. ! the outside world. Anything destined from that machine to port 119
  48. ! anywhere in the universe is allowed.
  49. !
  50. access-list 101 permit tcp 1.2.3.4 0.0.0.0 0.0.0.0 255.255.255.255 eq 119
  51. !
  52. ! The second entry lets machines that already have connections to the
  53. ! local machine continue to talk to it. Presumably they wouldn't have
  54. ! gotten those connections unless the local machine had initiated them.
  55. !
  56. access-list 101 permit tcp 0.0.0.0 255.255.255.255 1.2.3.4 0.0.0.0 established
  57. !
  58. ! In the real world, you'd probably want to permit more than the NNTP port,
  59. ! and/or allow connections to other machines. In particular, you'd probably
  60. ! want to allow ICMP from anywhere to anywhere, and you'd probably need to
  61. ! give the outside world TCP and UDP access to your DNS services. You might
  62. ! also have some mail hosts that needed to talk to outside hosts.
  63. !
  64. ! The second access list is very much like the first...
  65. access-list 102 permit tcp 0.0.0.0 255.255.255.255 1.2.3.4 0.0.0.0 eq 119
  66. access-list 102 permit tcp 1.2.3.4 0.0.0.0 0.0.0.0 255.255.255.255 established
  67. !
  68. interface ethernet 0
  69. ip access-group 101
  70. !
  71. interface serial 0
  72. ip access-group 102
  73.  
  74. Another common configuration would be to leave out access list 102
  75. entirely, so that the outside world could only connect to port 119 on your
  76. NNTP server, but your own (presumably trusted) host could connect to
  77. anything in the outside world that would accept the connection.
  78.  
  79. The "established" keyword was introduced in Release 8.2, but there's a
  80. problem with it in some versions. It's unlikely that anybody could actually
  81. exploit the bug to get unauthorized access to anything-- perhaps not
  82. impossible, but certainly very difficult, especially without knowing
  83. proprietary details of how Cisco routers work. The bug *will* sometimes
  84. make legitimate accesses fail.
  85.  
  86. The bug in question is CSCdi07901. It's fixed in all shipping software,
  87. including 8.3(6-and-above), 9.0(3), and 9.1(2). It was present in 8.2,
  88. 8.3(1-5), 9.0(1-2), and 9.1(1). Even if your software has the bug, you can
  89. avoid any incorrect behavior by disabling IP fast switching on the involved
  90. interfaces using the command "no ip route-cache". This will increase the
  91. load on your CPU, but isn't usually a problem, especially for the
  92. relatively slow WAN links where access lists are most often used. If you're
  93. concerned about system load without fast-switching, you can use "show
  94. process" and "show interface" to check for CPU overloading and/or packet
  95. drops. If disabling fast switching causes a load problem for you, you can
  96. order a ROM upgrade from Cisco, or download new net-bootable software via
  97. anonymous FTP from ftp.cisco.com.
  98.  
  99. The official release-note text for the bug follows--
  100.  
  101.    If extended access lists are used on an MCI, SCI or cBus interface,
  102.    the IP route cache is enabled, and also the 'established' keyword
  103.    is used, it can be improperly evaluated. This can permit packets
  104.    which should be filtered and exclude packets which should be
  105.    permitted. This behavior was first introduced in 8.2.
  106.  
  107. If you have any further problems or questions, you should probably send
  108. mail to "tac@cisco.com".
  109.  
  110.                                    -- J. Bashinski
  111.                                       Cisco Systems
  112.  
  113.