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

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