The pfSense Store

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - k-bull

Pages: [1]
1
Help from Nazar78, I got it working.  It ended up being the PATH in crontab.  Ran "echo $PATH" on a terminal and added whatever was missing on the PATH in crontab. And worked

Thanks,

2
OK,

I do hope someone else can help with this.  In the mean time, I'll go back to Nazar78.  Hopefully he can continue to help me out.  Wish me luck.

Thanks again.

3
I would like to thank you for your response back.

I was under the impression that if you can run a script manually, it'll run under cron.  I'm not a scripting person at all.  Definitely not my forte.  Is it possible if you or any one can get this script working in cron. Or please tell me what I need to do or change.  I would greatly appreciate the help and every one else looking for a solution to update the dns in godaddy.   Which I've seen is a lot.

Thanks,

4
Hello Everyone,

I've been trying to run this godaddy dns updater script that was created by NaZar78 ( BIG Ups to him 8) ) through cron.  And just like the subject says, I can run it manually with no errors.  But when I setup a cron for it, it doesn't run.  And yes I'm setting up the job through the cron gui/pakage and I chmod the file.  So can someone please help me with this.  I've been at it for a couple of months.  Below is the script.

Thanks,

Code: [Select]

#!/bin/sh

# GoDaddy.sh v1.1 by Nazar78 @ TeaNazaR.com
# http://teanazar.com/2016/05/godaddy-ddns-updater/

###########################################
# Simple DDNS script to update GoDaddy's DNS. Just schedule every 5mins in crontab.
# With options to run scripts/programs/commands on update failure/success.
#
# Requirements:
# - curl CLI - On Debian, apt-get install curl
#
# History:
# v1.0 - 20160513 - 1st release.
# v1.1 - 20170130 - Improved compatibility.
#
# PS: Feel free to distribute but kindly retain the credits (-:
###########################################

# Begin settings

# Get the Production API key/secret from https://developer.godaddy.com/keys/.
# Ensure it's for "Production" as first time it's created for "Test".

Key=Production key goes here
Secret=Production secret goes here

# Domain to update.

Domain=yourdomain.com

# Advanced settings - change only if you know what you're doing :-)
# Record type, as seen in the DNS setup page, default A.

Type=A

# Record name, as seen in the DNS setup page, default @.

Name=@

# Time To Live in seconds, minimum default 600 (10mins).
# If your public IP seldom changes, set it to 3600 (1hr) or more for DNS servers cache performance.

TTL=600

# Writable path to last known Public IP record cached. Best to place in tmpfs.

CachedIP=/tmp/current_ip

# External URL to check for current Public IP, must contain only a single plain text IP.
# Default http://api.ipify.org.

CheckURL=http://api.ipify.org

# Optional scripts/programs/commands to execute on successful update. Leave blank to disable.
# This variable will be evaluated at runtime but will not be parsed for errors nor execution guaranteed.
# Take note of the single quotes. If it's a script, ensure it's executable i.e. chmod 755 ./script.
# Example: SuccessExec='/bin/echo "$(date): My public IP changed to ${PublicIP}!">>/var/log/GoDaddy.sh.log'

SuccessExec=''

# Optional scripts/programs/commands to execute on update failure. Leave blank to disable.
# This variable will be evaluated at runtime but will not be parsed for errors nor execution guaranteed.
# Take note of the single quotes. If it's a script, ensure it's executable i.e. chmod 755 ./script.
# Example: FailedExec='/some/path/something-went-wrong.sh ${Update} && /some/path/email-script.sh ${PublicIP}'

FailedExec=''

# End settings

Curl=$(which curl 2>/dev/null)
[ "${Curl}" = "" ] &&
echo "Error: Unable to find 'curl CLI'." && exit 1
[ -z "${Key}" ] || [ -z "${Secret}" ] &&
echo "Error: Requires API 'Key/Secret' value." && exit 1
[ -z "${Domain}" ] &&
echo "Error: Requires 'Domain' value." && exit 1
[ -z "${Type}" ] && Type=A
[ -z "${Name}" ] && Name=@
[ -z "${TTL}" ] && TTL=600
[ "${TTL}" -lt 600 ] && TTL=600
echo -n>>${CachedIP} 2>/dev/null
[ $? -ne 0 ] && echo "Error: Can't write to ${CachedIP}." && exit 1
[ -z "${CheckURL}" ] && CheckURL=http://api.ipify.org
echo -n "Checking current 'Public IP' from '${CheckURL}'..."
PublicIP=$(${Curl} -kLs ${CheckURL})
if [ $? -eq 0 ] && [ "${PublicIP}" != "" ];then
echo "${PublicIP}!"
else
echo "Fail! ${PublicIP}"
eval ${FailedExec}
exit 1
fi
if [ "$(cat ${CachedIP} 2>/dev/null)" != "${PublicIP}" ];then
echo -n "Checking '${Domain}' IP records from 'GoDaddy'..."
Check=$(${Curl} -kLsH"Authorization: sso-key ${Key}:${Secret}" \
-H"Content-type: application/json" \
https://api.godaddy.com/v1/domains/${Domain}/records/${Type}/${Name} \
2>/dev/null|sed -r 's/.+data":"(.+)","t.+/\1/g' 2>/dev/null)
if [ $? -eq 0 ] && [ "${Check}" = "${PublicIP}" ];then
echo -n ${Check}>${CachedIP}
echo -e "unchanged!\nCurrent 'Public IP' matches 'GoDaddy' records. No update required!"
else
echo -en "changed!\nUpdating '${Domain}'..."
Update=$(${Curl} -kLsXPUT -H"Authorization: sso-key ${Key}:${Secret}" \
-H"Content-type: application/json" \
https://api.godaddy.com/v1/domains/${Domain}/records/${Type}/${Name} \
-d "{\"data\":\"${PublicIP}\",\"ttl\":${TTL}}" 2>/dev/null)
if [ $? -eq 0 ] && [ "${Update}" = "{}" ];then
echo -n ${PublicIP}>${CachedIP}
echo "Success!"
eval ${SuccessExec}
else
echo "Fail! ${Update}"
eval ${FailedExec}
exit 1
fi
fi
else
echo "Current 'Public IP' matches 'Cached IP' recorded. No update required!"
fi
exit $?


5
Hello,

I too am running into this problem.  I'm running ESXi 6.5d. I've been trying to add a 5th and 6th NIC using vmxnet3.  But there seem to be problem with the MAC's.  PFsense has MAC's for the extra nics but when I check the ESXi,  it has no MAC addresses.  I have redone the VM a few times , with fresh installs and still the same problem.  I believe there's a compatibility issue.  Mostly likely the problem is with ESXi. Can someone please confirm this.

6
Had it been possible, although I still think it is, apart from it being a great learning tool for those that don't know CLI, wouldn't it be a great GUI troubleshooting tool?  For example, if one changes something in the GUI and the show-command-line shows something, for those that know CLI will be able to see if the GUI did the commands correct or incorrect.

7
I have the exact same setup, but in production.  And yes you are correct.  Just make sure your VMkernel has management checked with dhcp enabled if you want pfSense to assign it an ip.  After you do that, then you could remove the VMkernel from vmk0

8
Hello Developers,

I've been a pfSense fan since the beginning.  I have to say, "GREAT JOB!".  My problem is is that I've always been a GUI tech. I've been trying very hard to get into CLI.  Some progress but not as thorough as I would like to be.  I ran  into this article http://www.networkcomputing.com/networking/gui-vs-cli-networking/2083404544.  The second to last paragraph sums it up.  How hard would it be to implement this into the already great, pfSense.  I think it would be a great addition to the project

9
OpenVPN / Re: OpenVPN - TAP - OpenVPN needs a gateway parameter
« on: May 10, 2016, 07:00:37 pm »
Solved

10
OpenVPN / Re: OpenVPN - TAP - OpenVPN needs a gateway parameter
« on: May 10, 2016, 10:07:34 am »
Well I finally figured it out.  I manually added "route-gateway" to the client with the ip of the gateway, and BAM! it worked

11
Routing and Multi WAN / Re: MultiWAN Link Aggregation
« on: January 26, 2014, 07:46:07 am »
For example, multiple people could watch the same Youtube video at the same time.  The way I'm understanding his setup is that it does just that.  That it requests the same Youtube video through each WAN and gets put together somehow by the NAT and the reordered ipf and ipw that he created.  Isn't that what FatPipe claims to do with their Warp product that uses their "Router Clustering" technology?
I think what's needed is for this to be dissected and inspected thoroughly by a group or individual that's very knowledgeable in this field.  Cause if this is at all true, it would be a great addition to PfSense.

12
Routing and Multi WAN / Re: MultiWAN Link Aggregation
« on: January 25, 2014, 12:42:31 pm »
I'm no FreeBSD expert, but I am very technically inclined.  According to his description that's exactly what he said its done with his configuration, which is the equal sum of the bandwidths of the links.  Please correct me if I'm wrong, but FreeBSD 4 was already able to load-balancing.  It would be helpful to really look at this in detail to really break it down to see if there really is any difference between load-balancing and his multiwan aggregation.

13
Routing and Multi WAN / MultiWAN Link Aggregation
« on: January 25, 2014, 08:11:27 am »
Hello,
I don't know if I should post this here or under Development.  But nonetheless,  I'm very interested in multiwan link aggregation.  I did some very heavy searching and found the attached.  Michael Brumm is the author of this.  I take no credit.  Granted, the material is outdated.  Is Based on FreeBSD 4.x.  He doesn't specify exactly which version of FreeBSD 4 he accomplished this with. But being that it is FreeBSD, it shouldn't be too much of a problem to implement this onto pfsense, if it does work.  Instructions and files are attached.  And as the author said, "Step right up ladies and gentlemen. The show is about to start."

Change the ext. from txt to rar to unzip.



Pages: [1]