I've been trying to set up the user_ip show_if section in my design parse file. The documentation in the manual acknowledges that the functionality exists, but that's about the depth of it.
<MySource_THEN>This will display if the IP rules match</MySource_THEN>
<MySource_ELSE>This will display if the <em>IP rules don't match</em>.</MySource_ELSE>
</MySource_AREA>
[/xml]
This will allow the design to be customised to include certain IP address ranges.
The configuration is a bit fiddly and I couldn't work out how to add more than one address range without uploading a CSV file.
The CSV file is as follows:
192 168 0 0 24 1
172 16 0 0 12 1
10 0 0 0 8 1
The CSV file I uploaded covers the three designated internal address ranges. The idea is that these will cover all users to our web site that are internal to the company, and separate them from external users from out in the real world.
It imports correctly into Matrix, and converts the subnet mask correctly. Unfortunately no matter what I do, the show_if always shows the [i]else[/i] case. Was just wondering if anyone could sanity check these settings for me, or if anyone's successfully using this feature themselves.
[quote]
I've been trying to set up the user_ip show_if section in my design parse file. The documentation in the manual acknowledges that the functionality exists, but that's about the depth of it.
<MySource_THEN>This will display if the IP rules match</MySource_THEN>
<MySource_ELSE>This will display if the <em>IP rules don't match</em>.</MySource_ELSE>
</MySource_AREA>
[/xml]
This will allow the design to be customised to include certain IP address ranges.
The configuration is a bit fiddly and I couldn't work out how to add more than one address range without uploading a CSV file.
The CSV file is as follows:
192 168 0 0 24 1
172 16 0 0 12 1
10 0 0 0 8 1
The CSV file I uploaded covers the three designated internal address ranges. The idea is that these will cover all users to our web site that are internal to the company, and separate them from external users from out in the real world.
It imports correctly into Matrix, and converts the subnet mask correctly. Unfortunately no matter what I do, the show_if always shows the [i]else[/i] case. Was just wondering if anyone could sanity check these settings for me, or if anyone's successfully using this feature themselves.
[/quote]
Is this on a public server (out on the web somewhere?). Those IP ranges are not publicly routable, so will probably go through some sort of network address translation before going out onto the Internet. This means that the server will never see those addresses if it in a public IP space.
[quote]
Is this on a public server (out on the web somewhere?). Those IP ranges are not publicly routable, so will probably go through some sort of network address translation before going out onto the Internet. This means that the server will never see those addresses if it in a public IP space.
[/quote]
The server is located in our DMZ, so there's no address translation for local addresses at that point. The keyword replacement %globals_server_remote_addr% verifies that my IP address shows up as a 192.168 address, but the show_if doesn't match.
[quote]
The server is located in our DMZ, so there's no address translation for local addresses at that point. The keyword replacement %globals_server_remote_addr% verifies that my IP address shows up as a 192.168 address, but the show_if doesn't match.
[/quote]
The only other thing I can think of is the match value user_ip isn't what you expect it to be. You could try to print that value instead of testing against it and see what value is output.