Koozali.org: home of the SME Server

Poll

Did you find this topic intersting?

Yes
1 (100%)
No
0 (0%)

Total Members Voted: 1

Voting closed: October 19, 2006, 11:39:15 PM

DynDNS: SME 7.0 with 2 domains behind a Firewall/Router

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #15 on: October 23, 2006, 12:45:28 AM »
I tried turning off the FTP access and could not connect using Filezilla with either admin or root profiles. I turned it back on and I could connect using admin and port 21. When I tried using the root profile and port 22 I got this;

Status:   Connecting to 192.168.7.1:22 ...
Status:   Connected with 192.168.7.1:22. Waiting for welcome message...
Response:   SSH-2.0-OpenSSH_3.9p1
Error:   Timeout detected!
Error:   Unable to connect!

So I can connect using putty with either root or admin profiles but not root with Filezilla...

I looked around and found that there is a file transfer for putty, something called PSCP but I couldn't figure out how to make that work.

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #16 on: October 23, 2006, 12:52:51 AM »
I managed to copy the file into my user profile on the server, into one of my ibays but I guess that this is next to useless. I could copy it into one of the admin folders, but I tried looking around with putty logged on as root but could not find the admin directories.

Help.

Ian

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #17 on: October 23, 2006, 01:24:55 AM »
yes!!!!

Its alive!

That means I found pscp and got it to work and tranferred the file

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #18 on: October 23, 2006, 01:44:19 AM »
I logged in as root using putty. I tried running the command /etc/e-smith/events/actions/update-dns.

I got the error:
Can't exec "/sbin/e-smith/cynamic-dns/custom": Permission denied at /etc/e-smith/events/actions/update-dns line 52

?

Ian

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #19 on: October 23, 2006, 01:47:15 AM »
Quote from: "imcintyre"
I logged in as root using putty. I tried running the command /etc/e-smith/events/actions/update-dns.

I got the error:
Can't exec "/sbin/e-smith/cynamic-dns/custom": Permission denied at /etc/e-smith/events/actions/update-dns line 52



Code: [Select]
chmod 554 /sbin/e-smith/dynamic-dns/custom
/etc/e-smith/events/actions/update-dns
Regards,
William

IF I give advise.. It's only if it was me....

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #20 on: October 23, 2006, 05:52:50 AM »
Thx for your input but I am not really sure what to do with this suggestions. I tried running it in putty and it just gave error that it was not a directory.

Am I missing something?

Ian

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #21 on: October 23, 2006, 07:29:17 AM »
Quote from: "imcintyre"
Thx for your input but I am not really sure what to do with this suggestions. I tried running it in putty and it just gave error that it was not a directory.

Am I missing something?

Ian


You do have a custom file in /sbin/e-smith/dynamic-dns/ ?

Lets start again.

Highlight the script in the prior post that want and select copy.

Login using putty as root.

Do the following lines at the prompt one at a time.
Code: [Select]
rm /sbin/e-smith/dynamic-dns/custom
Code: [Select]
y
Code: [Select]
pico -w /sbin/e-smith/dynamic-dns/custom
Now paste the script in by pressing the right mouse button.
Then
Code: [Select]
Control - x
Code: [Select]
y
Code: [Select]
Enter
Now
Code: [Select]
chmod 554 /sbin/e-smith/dynamic-dns/custom
Code: [Select]
/etc/e-smith/events/actions/update-dns
Regards,
William

IF I give advise.. It's only if it was me....

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #22 on: October 23, 2006, 03:51:29 PM »
Yes I do have the file "custom".


I will try these instructions tonight and let you know how it goes.

I tried setting this file up to use with the cron function in SME but I was only able to select files stored in the administrator and user folders.

How will this function run?

Thx for your help

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #23 on: October 25, 2006, 02:27:12 AM »
Please have a look at the following. The file "custom" ran and gave the following results. Could be Greek to me but I don't know any Greek ( no offense intended for Greeks) ;-)

Does this file--/sbin/e-smith/dynamic-dns/custom, now have to be put into crontab to run every 15 minutes or so? for this to work properly??

Thx in advance for any help or suggestions

[root@myserver1 ~]
--19:58:27--  http://dynamic.zoneedit.com/auth/dynamic.html?host=mysite.ca,*.                                                                             mysite.ca
           => `/tmp/dyndns.log'
Resolving dynamic.zoneedit.com... [root@mcserver1 ~]# aa.bb.cc.dd
Connecting to dynamic.zoneedit.com|aa.bb.cc.dd|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 210 [text/html]

100%[====================================>] 210           --.--K/s

19:58:35 (8.71 MB/s) - `/tmp/dyndns.log' saved [210/210]

host=mysite.ca,*.mysite.caeedit.com/auth/dynamic.html?
Resolving dynamic.zoneedit.com... [root@myserver1 ~]# aa.bb.cc.dd
Connecting to dynamic.zoneedit.com|aa.bb.cc.dd|:80... connected.
-bash: --19:58:27--: command not found
HTTP request sent, awaiting response... 200 OK
Length: 210 [text/html]
[root@myserver1 ~]#            => `/tmp/dyndns.log'
> Resolving dynamic.zoneedit.com... [root@myserver1 ~]#aa.bb.cc.dd
> Connecting to dynamic.zoneedit.com|aa.bb.cc.dd|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 210 [text/html]
>
> 100%[====================================>] 210           --.--K/s
>
> 19:58:35 (8.71 MB/s) - `/tmp/dyndns.log' saved [210/210]
>

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #24 on: October 25, 2006, 03:10:43 AM »
What does
Code: [Select]
more /tmp/dyndns.log give you.
Code: [Select]
[root@vmsme7gw ~]# more /tmp/dyndns.log
<SUCCESS CODE="201" TEXT="No records need updating." ZONE="williamscott.name" HOST="williamscott.name"><SUCCESS CODE="201" TEXT="No records need updating." ZONE="williamscott.name" HOST="*.williamscott.name">
[root@vmsme7gw ~]#


Post the result in a code box for better formatting.
Regards,
William

IF I give advise.. It's only if it was me....

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #25 on: October 25, 2006, 02:37:32 PM »
I tried your command string and got no output, just back to the regular cursor

Hopefully this is better, I ran the last command string you gave me over again.

Code: [Select]
login as: root
root@192.168.1.1's password:

[root@server1 ~]# /etc/e-smith/events/actions/update-dns
--08:21:21--  http://dynamic.zoneedit.com/auth/dynamic.html?host=mysite.ca,*.myssite.ca
           => `/tmp/dyndns.log'
Resolving dynamic.zoneedit.com... 64.85.73.40
Connecting to dynamic.zoneedit.com|64.85.73.40|:80... [root@server1 ~]# connected.
HTTP request sent, awaiting response... 200 OK
Length: 190 [text/html]

100%[====================================>] 190           --.--K/s

08:21:22 (10.07 MB/s) - `/tmp/dyndns.log' saved [190/190]


However, at this point I don't get my regular cursor back e.g. [root@server1 ~] The cursor is just at the left edge of the Putty "window". Is the command not ending properly?

I open up another session, log in as root, close the first session and try your command:
Code: [Select]
login as: root
root@192.168.1.1's password:
Last login: Wed Oct 25 08:19:01 2006 from pc-00253.my site.ca
[root@server1 ~]# more /tmp/dyndns.log
<SUCCESS CODE="201" TEXT="No records need updating." ZONE="mysite.ca" HOST="mysite.ca"><SUCCESS CODE="201" TEXT="No records need updating." ZONE="mysite.ca" HOST="*.mysite.ca">
[root@server1 ~]#


This looks equal to your output.
I have used crontab and put the command
/etc/e-smith/events/actions/update-dns
to run every 15 minutes

Does this make sense?

Thx in advance for your help.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #26 on: October 25, 2006, 03:46:30 PM »
Quote from: "imcintyre"


This looks equal to your output.
I have used crontab and put the command
/etc/e-smith/events/actions/update-dns
to run every 15 minutes

Does this make sense?

Thx in advance for your help.


I can't help you any further as I don't use a dynamic update script on my server only SME. I just setup a account at zoneedit to try the script out.

I thought the IP would change on reboot and thats when SME would update if it did. Plus there might be a regular update to keep the data fresh.

Every 15min sounds a lot. Careful you don't get banned for checking too often.
Regards,
William

IF I give advise.. It's only if it was me....

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #27 on: October 25, 2006, 06:17:40 PM »
Thx for your help. I will tone down the frequency of updates. Any ideas why
a) when I ran your command first nothing happened
b) when i ran the update it does not come back to the regular prompt?

I was thinking in all of this that it should be possible to write an if,then, else statement comparing a stored ip address to the one that is actual.  Then if they were different, update zone edit. But my actual programming days ended with Fortran and involved the use of cards. Not to mention that I sucked at it also. That way you could run as often as you liked...

Offline imcintyre

  • *
  • 609
  • +0/-0
DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #28 on: October 26, 2006, 05:06:28 AM »
Ernesto and William

I rebooted, got a new ip address, waited 20 minutes and went to zone edit and the ip address was correct.

Thx very much for helping, I wouldn't have known what to do otherwise.

Ian

Offline dalesyk

  • *
  • 12
  • +0/-0
Re: DynDNS: SME 7.0 with 2 domains behind a Firewall/Router
« Reply #29 on: May 27, 2008, 04:33:21 AM »
Hi all,
I have an SME 7.0 (server only) behind a Firewall/Router. I have two domains on this server and use zoneedit as my DynDNS service because I use private domain names.
The update-dns action script can't handle this situation as it won't know what the external IP address is.
I have rewriten the update-dns action script as follows:
...

Ernesto,
  I have a similar situation.  I currently have an SME server with dyndns@zoneedit as a gateway/router, but want to move to another SME server behind a voip router.  I want to move behing the voip router to try and improve voip sound quality but still host a few domains.  I tried running "lynx --dump http://checkip.dyndns.org" from an Ubuntu client behind my SME server, but it only reports my local ip address rather than my external ip.  I wonder if this behaves differently with a client behind hardware router as opposed to client behind SME router?  Also, I'm thinking about trying to scrape the external ip from my voip router status page with the help of grep, awk, etc...  If successful, I should be able to check my external ip every minute without hitting any external site.  Does this sound reasonable?  I'm curious how you setup your router in front of the SME server?  Do you use DMZ for your SME or just forward certain ports?

Thanks,

Dale Sykora

dale AT czexan DoT net