Cron Allowed IP - based on Dynamic DNS | Feature Request | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters – maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_TopicIcon
Cron Allowed IP – based on Dynamic DNS
December 5, 2012
9:14 pm
Avatar
Luc
Member
Members
Forum Posts: 12
Member Since:
November 19, 2012
sp_UserOfflineSmall Offline

Hi Xcloner devloppers,

 

would it be possible to add the ability to put dynamic IP style of address instead of an IP number. This dynamic IP address would then always lead to my last acquired IP-address.

 

So for example I would use a DynDNS (you have a lot of free alternatives, freedns, no-ip.com, buddyNS,…) style of functionality, fill out my personal DYNDNS address in XCloner, and XCloner could than easily determine my actual IP address based on an DNS address, which would lead to an IP.

Maybe I could run the script twice, so you can get the new IP from the DynDNS.

 

Kind regards,

 

Luc

December 6, 2012
9:45 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

HI Luc, this request is on the dev list, so we will add it in one of the future versions. Meanwhile, you can edit your cloner.cron.php file and remove that limitation found on line 31, simply remove that exit there to let the cron continue. You will also find there the code for adding your hostname based limitation which i think can be easily altered.

 

Ovidiu

December 12, 2012
9:38 am
Avatar
Luc
Member
Members
Forum Posts: 12
Member Since:
November 19, 2012
sp_UserOfflineSmall Offline

Ovidiu,

how can I add my dynamic address (xyz.dyndns.org) to this ip_list ?

$ip_list[] = $_SERVER['SERVER_ADDR'];
I am not so familiar with php script.
I can imagine I can just remove the if, to have no checking at all, but checking for my dynamic ip would be nicer.
if(!in_array($curent_ip, $ip_list)){
echo “Access Denied for ip $curent_ip!”;
exit;
}
I can test it for you (even if you are not 100% sure), and report the result.
Kidn regards,
Luc
December 12, 2012
8:57 pm
Avatar
Luc
Member
Members
Forum Posts: 12
Member Since:
November 19, 2012
sp_UserOfflineSmall Offline

Ovidiu,

 

I have solved it. I changed the code to the following:

 

$curent_ip = $_SERVER[“REMOTE_ADDR”];
$dynamic_ip = gethostbyname('xyz.dyndns.org');
if($curent_ip != $dynamic_ip){
  echo “Access Denied for ip $curent_ip!”;
exit;
}

 

this seems to be working.

Unfortunately now I have another problem:

Wehn I execute the cronjob php from the configurqtion tab, 2 tar files are being generated instead of 1. When I enable compression 4 files are being generated instead of 1. Files are always of almost same size (32Mb for Tar, 17 Mb for compressed).

 

Do you have any idea why it is run multiple times ?

 

Kind regards,

 

Luc

December 13, 2012
8:41 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

No idea why that happens, try testing it with a scron scheduler and see how it goes…. What is the timestamp for each of the files?

Ovidiu

December 20, 2012
7:22 am
Avatar
Luc
Member
Members
Forum Posts: 12
Member Since:
November 19, 2012
sp_UserOfflineSmall Offline

I did use a cron scheduler (from home using wget (no retries))

and I get the following:

backup_2012-12-15_23-20_www.***********-sql-nodrop.tgz 19.31 MB Sat 15th Dec 2012 23:22:36 (GMT +0000)

backup_2012-12-15_23-21_www.***********-sql-nodrop.tgz 28.99 MB Sat 15th Dec 2012 23:22:36 (GMT +0000)  
backup_2012-12-15_23-22_www.***********-sql-nodrop.tgz 19.23 MB Sat 15th Dec 2012 23:23:04 (GMT +0000)

 

strange thing are:

1 and 2 seems to have been started at the same time, but are resulting in 2 different sizes (the differnt size is something new, never seen that before)

3 was started different time.

Kind regards,

 

Luc

December 24, 2012
1:03 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Try setting the compress backup option back to No and see if it helps…

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 737
Members: 9580
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Rodolfo Peña
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0