LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-07-2012, 09:51 AM   #1
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
remote ssh between two computers with dynamic IPs


Never really had a need to set up remote ssh until I moved out of my parents house and in doing so, my rsnapshot server is no longer connected since it was set up to handle local machines on the network. I'd like to keep the rsnapshot server at my parents' house so that it would serve as a remote backup, however I see several issues with this all stemming from dynamic IP addresses on both sides. They don't change that frequently so I'm okay with changing hosts.allow, sshd.config, and rsnapshot.config manually, though if there was a way to automate this I'd like to hear.
 
Old 05-07-2012, 09:53 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
I would go with teamviewerfor this situation
 
Old 05-07-2012, 10:15 AM   #3
kfritz
Member
 
Registered: Aug 2006
Distribution: Slackware, OpenBSD, CentOS, Ubuntu
Posts: 99

Rep: Reputation: 31
Use a free DNS updating service and use DNS names. I use http://freedns.afraid.org/. Then set up key-based login and disable password based login in SSH. The second step is optional, but I guarantee you'll have a constant barrage of brute-force password guessing directed at port 22.
 
1 members found this post helpful.
Old 05-07-2012, 12:51 PM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
I did pretty much the same thing as you're trying to do with DynDNS http://www.dyndns.com and, to keep the kiddies and bad actors out of my pants, with DenyHosts http://denyhosts.sourceforge.net/. I can highly recommend both.

DynDNS runs a a daemon and actively changes its address for you (you get to make up host names) when you, oh, turn of the modem or whatever that causes the ISP to give you a new address. It's a freebie.

DenyHosts also runs as a daemon and watches /var/log/syslog (or whatever you like) where remote connections are logged and automagically adds entries to /etc/hosts.deny (or IPTABLES or...) to refuse connections from folks that attempt to log in as root, wheel and other "privileged" user accounts (with failed passwords). It also shares with world-wide users' experiences (if you want) and downloads other DenyHosts users banned site addresses. This one I like -- it works, it's invisible to you and it puts a stop to a lot of nonsense from a whole lot of places.

You can, of course, remap the SSH address to an alternative port; this requires you to add that port number to the SSH connection (as in ssh snafu:12345).

It's pretty simple, your ISP changes your address, DynDNS uploads that to the DynDNS server and life is good.

Hope this helps some.
 
1 members found this post helpful.
Old 05-07-2012, 12:55 PM   #5
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by tronayne View Post
I did pretty much the same thing as you're trying to do with DynDNS http://www.dyndns.com and, to keep the kiddies and bad actors out of my pants, with DenyHosts http://denyhosts.sourceforge.net/. I can highly recommend both.

DynDNS runs a a daemon and actively changes its address for you (you get to make up host names) when you, oh, turn of the modem or whatever that causes the ISP to give you a new address. It's a freebie.
I use DynDNS but ddclient is terribly unreliable.
 
Old 05-07-2012, 01:04 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I did use DynDNS and my router was supposed to update but it didn't check in often enough or something and my domain name expired. Now when I look on their site I don't see a free option.
I'd recommend changing the port for SSH. It may sound like security through obscurity but it makes it a darn sight easier to check your logs for intrusion attempts than if it's left on 22.
 
Old 05-07-2012, 02:04 PM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Quote:
Originally Posted by 273 View Post
I did use DynDNS and my router was supposed to update but it didn't check in often enough or something and my domain name expired. Now when I look on their site I don't see a free option.
It works a lot better if you configure like this (routers don't do a good job of this):
Code:
## ddclient configuration file
daemon=600
# check every 600 seconds
syslog=yes
# log update msgs to syslog
mail-failure=Your_Real_E-Mail_Address@wherever.whatever # Mail failed updates to user
pid=/var/run/ddclient.pid
# record PID in file.
## Detect IP with our CheckIP server
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
## DynDNS username and password here
login=Your_DynDNS_User_ID
password=Your_DynDNS_Password
## Default options
protocol=dyndns2
server=members.dyndns.org
## Dynamic DNS hosts
Mine's been running for years like this, zero problems.

Hope this helps some.
 
1 members found this post helpful.
Old 05-07-2012, 02:26 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Thanks tronayne, I have used something similar in the past and it worked fine. The problems I'd have now are that I don't currently have an always on machine and, as I mentioned, I don't see a free offering from DynDNS any more. I don't currently need it though, so I'll investigate further if/when I do.
That said, I agree if there's a free option still this would be a good idea to solve the dimm0k's question.
 
Old 05-08-2012, 01:45 PM   #9
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 360

Rep: Reputation: 199Reputation: 199
Yet another way to use dynamic DNS is Hurricane Electric Free DNS service, though you have to provide your own domain name.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Remote access to servers with dynamic IPs without configuring ports neopandid Linux - Server 6 08-31-2012 10:53 PM
Dynamic IPs agunhan Linux - Networking 1 03-01-2006 11:15 AM
Dynamic DNS for remote telnet ssh logins? nadsab Linux - Networking 10 03-27-2004 11:53 AM
dns and dynamic ips, please help! myk3 Linux - Networking 2 11-17-2003 10:32 AM
finding out the ips of computers on my lan sanjeevan Linux - Networking 3 07-10-2003 09:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration