Forum Discussion
TFL-Support_913
Nimbostratus
Jan 27, 2011Data Group Lists for iRules
Hi everyone,
We need to create an iRule to allow access to a VIP from only a certain list of IP addresses. I can see how to do this by creating an iRule that references an IP Address Data Group. The problem lies in that we have a 20,000 user network and need to restrict the access to 600 individual IP addresses. We can do some summarization but we're still looking at 500 entries into the Data Group.
Does anyone know if you can import a text file or copy and paste somehow into the IP Address Data Group to save entering 500 IP addresses?
Thanks very much in advance.
-Tim
11 Replies
Sort By
- Chris_Miller
Altostratus
You could either use an external class which requires you to create a file and paste it in there...otherwise, you could simply edit the config file and paste into there. - John_Finucane_8
Nimbostratus
Another option is to look at iControl to handle the Data Group - Colin_Walker_12Historic F5 AccountYour best options are:
- TFL-Support_913
Nimbostratus
Hi guys, - Colin_Walker_12Historic F5 Account
- Chris_Klomp_115
Nimbostratus
I'm new here and am trying to create the ip list to be imported as a data-group.
This is my file:
Trying to import it with the GUI, I get error: 01070626:3: The IP data group external file (/config/filestore/.stage_d/502_d/Common_d/data_group_d/:Common:banned-ip-list.file_1) has an invalid format, line: 1.6.6.16.197/32 := "host1", 6.1.17.133/32 := "host 2",
Then I tried to load it from the command line and I get:
What am I doing wrong? Rgds, Chris.[chris@LTM-51:Active] ~ tmsh create /sys file data-group banned-ip-list.file separator ":=" source-path /var/class/banned-ip-list.dg type address Syntax Error: invalid property value "type":"address" [chris@LTM-51:Active] ~ tmsh create /sys file data-group banned-ip-list.file separator ":=" source-path /var/class/banned-ip-list.dg type ip curl: (3) malformed Unexpected Error: Failed! exit_code (3). [chris@LTM-51:Active] ~
- Mark_Crosland_2Historic F5 AccountYou need to preceed the name of the file with
- nitass
Employee
01070626:3: The IP data group external file (/config/filestore/.stage_d/502_d/Common_d/data_group_d/:Common:banned-ip-list.file_1) has an invalid format, line: 1.have you seen "Handling Line Terminator Discrepencies" section in the following article? can you try? - Chris_Klomp_115
Nimbostratus
OK I'm now getting to the invalid format error 😞6.6.16.197/32 := "host1", 6.1.17.133/32 := "host 2",
"6.6.16.197/32" := "host1", "6.1.17.133/32" := "host 2",
6.6.16.197 := "host1", 6.1.17.133 := "host 2",
"6.6.16.197" := "host1", "6.1.17.133" := "host 2",
tmsh create /sys file data-group banned-ip-list.file separator ":=" source-path file:/var/class/banned-ip-list.dg type ip 01070626:3: The IP data group external file (/config/filestore/.stage_d/524_d/Common_d/data_group_d/:Common:banned-ip-list.file_1) has an invalid format, line: 1.
- nitass
Employee
e.g.[root@ve11a:Active:Changes Pending] config cat /var/tmp/test.txt host 6.6.16.197 := "host1", network 6.6.17.0/24 := "host2", [root@ve11a:Active:Changes Pending] config tmsh create sys file data-group banned-ip-list separator := source-path file:/var/tmp/test.txt type ip [root@ve11a:Active:Changes Pending] config tmsh list sys file data-group banned-ip-list sys file data-group banned-ip-list { checksum SHA1:60:37aa2406b8368adf69e80ce408890d9efcbc9b3c create-time 2013-03-14:21:12:28 created-by root last-update-time 2013-03-14:21:12:28 mode 33152 revision 1 size 60 source-path file:/var/tmp/test.txt type ip updated-by root }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects