LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2009, 02:01 PM   #1
landysaccount
Member
 
Registered: Sep 2008
Location: Dominican Republic
Distribution: Debian
Posts: 188

Rep: Reputation: 18
Getting Dynamic IP Address


Hello.

I have a server behind a dsl modem that has a dynamic ip address assigned. I need to remotely access this server a couple of times during the day. I don't have anyone that can provide me with the ip.

I tried to make a script that will get the ip address with wget:
wget http://www.whatismyip.com/automation/n09230945.asp. This command downloads the n0923.... file with the modem's external ip. After downloading the file I needed to email me with the ip address:
mail -a "Content-type: text/html;" -s "New IP Address" user@example.com < ./n09230945.asp

Since, I am using dynamic ip address I am unable to send emails from that server.

Does anyone have an idea on how I can accomplish this task?

Thanks in advanced.
 
Old 01-12-2009, 02:17 PM   #2
junpa
Member
 
Registered: Aug 2008
Location: Northern Hemisphere
Distribution: Slackware, OpenVMS, fbsd
Posts: 51

Rep: Reputation: 16
have you looked at DynDNS ?
 
Old 01-13-2009, 07:37 AM   #3
dickgregory
Member
 
Registered: Oct 2002
Location: Houston
Distribution: Arch, PCLinuxOS, Mint
Posts: 257

Rep: Reputation: 34
Here's my setup.

My server is also behind a DSL modem. I have a Linksys router between the modem and the rest of my home network. On the Linksys, I set the SSH and HTTP ports to forward to the local IP of the server, which I have set up with a static address of 192.168.1.11. I open SSH port and HTTP port on the server firewall.

Then I registered with Dyndns and installed the client software. When you register with Dyndns, you will need a public domain name which will cost a little bit. The client software will periodically check to see what your current public dynamic address is. If it has changed since the last time, it will connect to Dyndns to report the change. When Dyndns gets a DNS request for your domain name, it will look up the current IP and connect the requester to your router, which will in turn forward to your server.

For security purposes, It is a good idea to create a public/private key for SSH access. I carry my public key on a flash drive in my pocket so I can connect from anywhere. I also have the pubkey installed on my work computer. Of course there is also the issue of the ethics of using work resources for personal reasons. It's up to you to ensure that your are staying within company guidelines.
 
Old 01-13-2009, 07:43 AM   #4
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 307

Rep: Reputation: 38
Woah, don't pay for Dynamic DNS tracking. Most is free and if you have a good router/modem it'll have user/pass for automatically updating dynamicDNS sites.

http://www.no-ip.com/ is completely FREE!

Agree with the SSH protection though.
 
Old 01-14-2009, 07:04 AM   #5
dickgregory
Member
 
Registered: Oct 2002
Location: Houston
Distribution: Arch, PCLinuxOS, Mint
Posts: 257

Rep: Reputation: 34
The Dyndns service I am using is free, I'm not paying for it. What I am paying for is a domain name. I tried no-ip which offers a similar service but for some reason it was not working for me, so I switched to dyndns and it works.

The reason I pay for a name is because I prefer to not use one of the canned names that are provided free by dyndns.

To the OP: If you are satisfied with using one of Dyndns's supplied domain names, you can get that for free along with the forwarding service. Sorry I forgot to mention that. I believe the same is true of no-ip. Use whichever you prefer. There are probably others also if you want to search for them.
 
Old 01-14-2009, 02:44 PM   #6
landysaccount
Member
 
Registered: Sep 2008
Location: Dominican Republic
Distribution: Debian
Posts: 188

Original Poster
Rep: Reputation: 18
I tried no-ip but it doesn't work. I registered with them and used one of their example.no-ip.info but, when I try to access the server it doesn't find it.

I also installed the client program in the box I need to access remotely.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
About dynamic IP address satimis Linux - Networking 8 10-24-2006 08:11 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 03:35 AM
Can BIND be used with a dynamic IP address? daihard Linux - Software 4 04-24-2006 06:45 PM
Fix ip address vs Dynamic ip address yenonn Linux - Networking 5 04-13-2004 07:25 AM
dynamic IP address acid_kewpie Linux - Networking 4 09-13-2001 02:53 AM


All times are GMT -5. The time now is 01:55 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration