1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-19 17:57:22 +01:00

see #1986 Cisco ASA remarks should be truncated to 100 characters or less; truncated remark lines

This commit is contained in:
Vadim Kurland 2011-01-25 11:25:20 -08:00
parent 979224573b
commit 2c85c952bf
40 changed files with 99 additions and 134 deletions

View File

@ -1,3 +1,11 @@
2011-01-25 vadim <vadim@netcitadel.com>
* ACL.cpp (trimLine): fixes #1986 "Cisco ASA remarks should be
truncated to 100 characters or less". Trimming all lines used for
access list remarks to <100 characters. Remarks can only be less
than 101 characters on PIX/ASA and less than 100 characters on
IOS.
2011-01-24 Vadim Kurland <vadim@netcitadel.com>
* PolicyCompiler.cpp (addMgmtRule): fixes #1966 "IOSACL:

View File

@ -39,6 +39,15 @@ string ciscoACL::addLine(const std::string &s)
return printLastLine();
}
/*
* "remark" lines should be less than 101 on PIX/ASA and less than 100 on IOS
*/
string ciscoACL::trimLine(const string &s)
{
if (s.length() < 100) return s;
return s.substr(0, 100);
}
string ciscoACL::quoteLine(const string &s)
{
if (quote_remarks && s.find(' ') != string::npos)
@ -56,7 +65,7 @@ string ciscoACL::addRemark(const std::string &rl, const std::string &comment)
string output;
if (_last_rule_label != rl)
{
acl.push_back(" remark " + quoteLine(rl));
acl.push_back(" remark " + quoteLine(trimLine(rl)));
output += printLastLine();
nlines++;
@ -67,12 +76,14 @@ string ciscoACL::addRemark(const std::string &rl, const std::string &comment)
c1 = 0;
while ( (n = comment.find("\n", c1)) != string::npos )
{
acl.push_back(" remark " + quoteLine(comment.substr(c1, n-c1)));
acl.push_back(" remark " + quoteLine(
trimLine(comment.substr(c1, n-c1))));
output += printLastLine();
nlines++;
c1 = n + 1;
}
acl.push_back(" remark " + quoteLine(comment.substr(c1)));
acl.push_back(" remark " + quoteLine(
trimLine(comment.substr(c1))));
output += printLastLine();
nlines++;
}

View File

@ -47,7 +47,8 @@ namespace fwcompiler {
std::string printLine(const std::string &s);
std::string quoteLine(const std::string &s);
std::string trimLine(const std::string &s);
public:
ciscoACL() {
_ip_acl = false;

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:09 2011 PST by vadim
! Generated Tue Jan 25 11:22:49 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:10 2011 PST by vadim
! Generated Tue Jan 25 11:22:49 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:09 2011 PST by vadim
! Generated Tue Jan 25 11:22:48 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:10 2011 PST by vadim
! Generated Tue Jan 25 11:22:49 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:52 2011 PST by vadim
! Generated Tue Jan 25 11:22:32 2011 PST by vadim
!
! Compiled for pix 6.2
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:52 2011 PST by vadim
! Generated Tue Jan 25 11:22:32 2011 PST by vadim
!
! Compiled for pix 6.1
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:52 2011 PST by vadim
! Generated Tue Jan 25 11:22:32 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:52 2011 PST by vadim
! Generated Tue Jan 25 11:22:32 2011 PST by vadim
!
! Compiled for pix 6.2
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:54 2011 PST by vadim
! Generated Tue Jan 25 11:22:34 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:54 2011 PST by vadim
! Generated Tue Jan 25 11:22:34 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:54 2011 PST by vadim
! Generated Tue Jan 25 11:22:34 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:55 2011 PST by vadim
! Generated Tue Jan 25 11:22:34 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:56 2011 PST by vadim
! Generated Tue Jan 25 11:22:36 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:57 2011 PST by vadim
! Generated Tue Jan 25 11:22:36 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:56 2011 PST by vadim
! Generated Tue Jan 25 11:22:36 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:57 2011 PST by vadim
! Generated Tue Jan 25 11:22:36 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:58 2011 PST by vadim
! Generated Tue Jan 25 11:22:38 2011 PST by vadim
!
! Compiled for pix 6.2
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:59 2011 PST by vadim
! Generated Tue Jan 25 11:22:38 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:41:05 2011 PST by vadim
! Generated Tue Jan 25 11:24:50 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported
@ -74,61 +74,6 @@ object-group network id16988X10208.dst.net.0
exit
object-group network id4390C25825682.dst.net.0
network-object 58.33.181.83 255.255.255.255
network-object 58.53.82.190 255.255.255.255
network-object 58.231.13.78 255.255.255.255
network-object host 61.150.47.112
network-object 61.184.14.102 255.255.255.255
network-object 64.106.85.186 255.255.255.255
network-object 70.228.60.100 255.255.255.255
network-object 80.51.236.6 255.255.255.255
network-object 80.243.72.149 255.255.255.255
network-object 80.249.77.34 255.255.255.255
network-object 81.2.36.254 255.255.255.255
network-object 81.196.74.125 255.255.255.255
network-object 82.77.37.174 255.255.255.255
network-object 82.117.221.205 255.255.255.255
network-object 82.143.196.17 255.255.255.255
network-object 84.90.8.198 255.255.255.255
network-object 151.8.224.178 255.255.255.255
network-object 168.156.76.20 255.255.255.255
network-object 193.207.126.36 255.255.255.255
network-object 195.136.186.35 255.255.255.255
network-object 196.15.136.15 255.255.255.255
network-object 201.10.180.138 255.255.255.255
network-object 201.17.93.16 255.255.255.255
network-object 201.36.156.121 255.255.255.255
network-object 202.96.112.93 255.255.255.255
network-object 202.103.25.253 255.255.255.255
network-object 203.162.3.209 255.255.255.255
network-object 203.209.124.144 255.255.255.255
network-object 210.106.193.237 255.255.255.255
network-object 210.222.114.102 255.255.255.255
network-object 211.144.143.143 255.255.255.255
network-object 211.172.218.237 255.255.255.255
network-object 211.250.16.132 255.255.255.255
network-object 212.21.241.31 255.255.255.255
network-object 212.100.212.100 255.255.255.255
network-object 218.18.72.252 255.255.255.255
network-object 218.39.114.122 255.255.255.255
network-object 218.55.115.43 255.255.255.255
network-object 218.104.138.146 255.255.255.255
network-object 219.132.104.160 255.255.255.255
network-object 220.71.17.86 255.255.255.255
network-object 220.81.50.105 255.255.255.255
network-object 220.91.99.46 255.255.255.255
network-object 221.14.249.242 255.255.255.255
network-object 221.166.177.135 255.255.255.255
network-object 221.198.33.38 255.255.255.255
network-object 221.202.160.233 255.255.255.255
network-object 221.205.54.125 255.255.255.255
network-object 221.217.44.248 255.255.255.255
network-object 222.100.212.223 255.255.255.255
network-object 222.121.118.144 255.255.255.255
network-object 222.174.113.2 255.255.255.255
exit
object-group network id4388CFF8674.src.net.0
network-object 58.33.181.83 255.255.255.255
network-object 58.53.82.190 255.255.255.255
network-object 58.231.13.78 255.255.255.255
@ -214,7 +159,7 @@ access-list outside_acl_in deny tcp any object-group id4390C25825682.dst.net.0
access-list inside_acl_in deny tcp any object-group id4390C25825682.dst.net.0 eq 25
!
! Rule 5 (global)
access-list outside_acl_in deny ip object-group id4388CFF8674.src.net.0 any log 6 interval 300
access-list outside_acl_in deny ip object-group id4390C25825682.dst.net.0 any log 6 interval 300
!
! Rule 6 (global)
access-list outside_acl_in deny ip object-group id4390C25825682.dst.net.0 any log 6 interval 300

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:39:59 2011 PST by vadim
! Generated Tue Jan 25 11:22:38 2011 PST by vadim
!
! Compiled for pix 6.2
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:00 2011 PST by vadim
! Generated Tue Jan 25 11:22:40 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:01 2011 PST by vadim
! Generated Tue Jan 25 11:22:40 2011 PST by vadim
!
! Compiled for pix 6.2
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:01 2011 PST by vadim
! Generated Tue Jan 25 11:22:40 2011 PST by vadim
!
! Compiled for pix 6.2
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:02 2011 PST by vadim
! Generated Tue Jan 25 11:22:41 2011 PST by vadim
!
! Compiled for pix 8.2
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:02 2011 PST by vadim
! Generated Tue Jan 25 11:22:42 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:02 2011 PST by vadim
! Generated Tue Jan 25 11:22:42 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:03 2011 PST by vadim
! Generated Tue Jan 25 11:22:42 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:04 2011 PST by vadim
! Generated Tue Jan 25 11:22:43 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:05 2011 PST by vadim
! Generated Tue Jan 25 11:22:43 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:05 2011 PST by vadim
! Generated Tue Jan 25 11:22:44 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:05 2011 PST by vadim
! Generated Tue Jan 25 11:22:45 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:06 2011 PST by vadim
! Generated Tue Jan 25 11:22:45 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:07 2011 PST by vadim
! Generated Tue Jan 25 11:22:44 2011 PST by vadim
!
! Compiled for pix 8.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:07 2011 PST by vadim
! Generated Tue Jan 25 11:22:47 2011 PST by vadim
!
! Compiled for fwsm 2.3
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:07 2011 PST by vadim
! Generated Tue Jan 25 11:22:47 2011 PST by vadim
!
! Compiled for fwsm 4.x
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:09 2011 PST by vadim
! Generated Tue Jan 25 11:22:47 2011 PST by vadim
!
! Compiled for pix 7.0
! Outbound ACLs: supported

View File

@ -1,9 +1,9 @@
!
! This is automatically generated file. DO NOT MODIFY !
!
! Firewall Builder fwb_pix v4.2.0.3445
! Firewall Builder fwb_pix v4.2.0.3446
!
! Generated Mon Jan 24 16:40:09 2011 PST by vadim
! Generated Tue Jan 25 11:22:47 2011 PST by vadim
!
! Compiled for pix 6.3
! Outbound ACLs: not supported