LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-31-2002, 09:33 PM   #1
DeezNutz
LQ Newbie
 
Registered: Dec 2002
Location: Ocean County, NJ
Distribution: Mandrake 9.0
Posts: 22

Rep: Reputation: 15
pure-ftpd and dyndns?


I wonder if anyone else has run into this problem: I set up an account with no-ip.com. I can get into my ftp server from outside by running pure-ftpd -p 50000:50100 -A -P 128.92.177.XXX & without a problem. I setup my linksys router to forward ports 50000 through 50100 to my local box.

My main problem is when my ISP decides to change my ip address. I have to telnet in, stop the server and restart it with my new IP. Is there a way to automatically do this, or maybe just use the host name (somethingstupid.serveftp.com) from no-ip?

I found a few threads on the Pure-ftpd site that had the same questions, but they went unanswered from the beginning of 2002 Someone had mentioned that they made a script that would check the current ip against the last ip that pure-ftpd was started with and if it was different the script would restart pure-ftpd with the new ip address. I have no idea how to write scripts....

Any ideas?
 
Old 12-31-2002, 10:41 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yes, actually I have an account there too. ftp://masterc.no-ip.org

Anyway...

noip.com has a tool that you place in your rc.local file to startup with each boot. It detects the IP, and then sends that to your no-ip account to keep it updated.

Then to connect, you just have to use the hostname, just like I have up there. That's it AFAIK.

Now unless your ISP is changing your IP more often than you reboot, this will work. If you aren't rebooting as often (which is good) then you will probably want to run the noip program as a cron or something, depending on your needs, how often.

HTH

Cool
 
Old 12-31-2002, 10:49 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Oh, and if you don't mind, what Linksys do you have? I just got my DSL Router today, it's the BEFSR41

I am stoked about using it, but very afraid at the same time as I have very little to no networking skills.

Cool
 
Old 01-01-2003, 01:04 AM   #4
DeezNutz
LQ Newbie
 
Registered: Dec 2002
Location: Ocean County, NJ
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
I loaded the software from no-ip (actually, I have it running on my Win2K machine as well, just as a backup.).

The problem is if I lose my connection for whatever reason, (power outage, sometimes I have to reset the router, or my 3 year old climbing behind my desk to unplug things, etc...) I have to shut down the ftp and restart it with the new ip address.

Example, I had an IP of 128.92.177.199, when I reconnected, I got 128.92.176.69. Now I have to log into the machine either locally if i'm at home or through telnet if i'm not, and kill the ftpd process and restart it with these options: pure-ftpd -p 50000:50100 -A -P 128.92.176.69 &. It would be nice to have either a switch that would just allow the hostname or a script that could check the current public IP against the IP that pure-ftpd was started with.

If I leave the -P 128.92.176.69 option out, the server tells the client to expect a connection coming from 192.168.1.70 (the internal address) instead of the public address. Since 192.168.1.70 isn't viewable from the public internet, the FTP client just hangs and eventually times out.

The router, BTW, is a BEFSR41 v.2. I picked it up for $30 used, and it's been working fine for about 4 months. I've had to reset it once or twice, just be careful not to hold the reset button down too long or you'll lose all your settings. (It was hard enough trying to dig up my dsl account info )It's been pretty easy to setup so far.

Wow... sorry for the novella here... Have a happy, safe and prosperous 2003, and good luck with the router!
 
Old 01-01-2003, 11:20 PM   #5
DeezNutz
LQ Newbie
 
Registered: Dec 2002
Location: Ocean County, NJ
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
Just another thought...

Does anyone know of any good resources to read up on scripting in linux?

Thanks again!
 
Old 01-02-2003, 04:34 PM   #6
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Indeed...

' This document is both a tutorial and a reference on shell scripting with Bash. It assumes no previous knowledge of scripting or programming, but progresses rapidly toward an intermediate/advanced level of instruction.'

http://www.tldp.org/LDP/abs/html/index.html

Enjoy

Slick.
 
Old 01-02-2003, 04:37 PM   #7
DeezNutz
LQ Newbie
 
Registered: Dec 2002
Location: Ocean County, NJ
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks, I'll take a look at it when I get home tonight.
 
Old 01-05-2003, 08:08 AM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Deez, how did you setup your router to "forward"? I went into the advanced screen and clicked on forward, *thought* I did things correctly, but still people cannot access my ftp server.

I have no gone back to not using the router until I can figure out what I am doing...

Thanks for any pointers. (btw, what's UPnP?)

Cool
 
Old 01-05-2003, 10:01 AM   #9
DeezNutz
LQ Newbie
 
Registered: Dec 2002
Location: Ocean County, NJ
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
Well, the forwarding part was pretty easy.
I'm using firmware version 1.43 (I'm not sure if the options will be the same on different revisions)
I set a static IP on my linux machine. (192.168.1.69).
Go into the Advanced options and then the Forwarding tab.
I actually created 2 entries here:

FTP, Ext. Port 20 to 21, both UDP and TCP are checked, the IP is set to 192.168.1.69 and the enabled checkbox is checked.

The second entry is:
FTPPasV, Ext. Port 50000 to 50100, both UDP and TCP are checked, the IP is set to 192.168.1.69 and the enabled checkbox is checked.

After that, I start pure-ftpd with these options:
pure-ftpd -p 50000:50100 -A -P 128.92.176.69 &
The IP address in that command line is your external ip assigned by your ISP, the -p 50000:50100 is the ports that will be used for passive transfers. It should work then.

I found this info here: Linksys BEFSR41 FTP Server Setup

I hope this helps

Oh, and UPnP is Universal Plug and play. It allows the router to open ports automatically, if the applications use it. So far the only thing I found opening ports was MSN Messenger. I disabled the option in the Passwords section of the configuration pages )

Last edited by DeezNutz; 01-05-2003 at 10:10 AM.
 
Old 01-05-2003, 10:13 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Thank you! I will definitely give this a try tomorrow when I go to work. I am so network illiterate it's funny; but your directions are straight forward, so thank you.

Oh, and UPnP sounds like a good idea in theory, but I wonder how well it works in practice? Thanks again for all the info.

Cool
 
  


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
pure-ftpd roofy Linux - Software 6 03-05-2007 05:06 AM
pure-ftpd help hongman Linux - Software 16 04-06-2005 12:18 PM
Pure-ftpd zaicheke Linux - Software 2 08-19-2004 07:20 PM
Pure-ftpd help ksgill Linux - Newbie 15 04-18-2003 01:24 AM
help with pure-ftpd blank Linux - General 3 03-31-2002 11:54 AM


All times are GMT -5. The time now is 09:32 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