• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

ipv4_end.php script not working for specific IP address range [189.0.0.0/8]

Started by avenger, June 21, 2009, 12:53:59 PM

Previous topic - Next topic

avenger

My scripts were failing with a complain from server:

QuotePlease enter a valid IPv4 endpoint!

Then I tried to manually specify the IP address to the one of a machine I have hosted in tampa/fl/us and it worked at once. Then I entered the site and manually specified my actual IP address.

Today after a power outage, the problem persisted. My IP address was changed and again I had to change it using the website interface. Something is not accepting the IP address range I use and I doubt they are banned.

I printed the output of the script and the command sent (bash script) is:
curl -k -s https://www.tunnelbroker.net/ipv4_end.php?ipv4b=189.107.138.33\&tunnel_id=[tunnelid]\&pass=[md5sum]\&user_id=[md5sum]

I have already changed it to 'ipv4.tunnelbroker.net' but as I am receiving the error message from the ipv4_end.php script I suppose it is not the problem now.

I left the IP address in its entirety so you could check anything on the script regarding the test of this IP which is an actual sample of an unacceptable IP address. When I tried the foreign IP (which started with 66.111) I just kept all variables from the print command, and changed the IP accordingly, and the update were successful.

So, I am quite sure it is a problem when the ipv4_end.php script is checking if the IP is a valid IP address, maybe disallowing 200-189-201 prefix 8 IP ranges.

kcochran

Looks like curl is actually sending the \ along with the IP address.  I fed the validation code the IP address alone that you specified, and it checks clear.  As to any IP bans, it actually will report if an IP is blocked.

For the curious, the validation is: $ip == long2ip(ip2long($ip))

avenger

Strange... Have anyway you 'filtered' these escapes? I tried now and it just worked fine with either escaping the &'s (\&) and enclosing the whole address with single-quotes ('). Anyway I changed to single-quote.

I don't see how could curl send the escapes as they supposedly are not sent to curl as I typed that from a shell prompt... But whatever it is working now, thank you!

By the way, I also did not expect after all to be banned as I have set it up so only when the dsl pppoe-connect script runs (or loops when IP address is changed) is that an attempt to update the IP address is run, which is unusual to happen two times a day (actually two times a week is the average).

Thanks again