Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just come back off holiday, and repaired my broken mail server, which was easy, just didn't have time b4 hols. I moved it to another box on my network, which is rapidly becoming my server box. JUanty.
My main box, (terminal) also running jaunty, is my annon ftp server, which works fine. As my website is now be served from tux2, I need user ftp on that box to uplaod photos and the like, for the webiste.
Now to explain, I have one IP numeber, and dynadns so tux.isa-geek.org and tux2... basicly resolve to the same place. So I ask my router to port forward, mail stuff to 192.168.1.4 (tux2) and annon ftp to 192.168.1.3 (tux)
So I have setup port 90-91 to be tux2's ftp.
I have changed services ftp bit to 90 and 91
and chaged proftpd's port number to 90.
but can't connect any ideas?
Resolving address of tux2.isa-geek.org
Status: Connecting to 82.6.x.x:91...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error: Could not connect to server
---
also I used NX while I was away, to logon, to update the website, this uses ssh. fine. But to connect to tux, how would I change the ssh port of tux?
A good starting point might be to determine whether or not the server is listening on the new port.
Code:
lsof -i tcp:91
I think you mentioned you are using ubuntu, in that case add sudo in front of lsof.
Code:
sudo lsof -i tcp:91
I don't have an FTP server running on port 91, I do however have an ssh server running on port 22. Here is what the output should look like
Code:
user@hostname:~$ sudo lsof -i tcp:22
[sudo] password for user:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sshd 2877 root 3u IPv4 6704 TCP *:ssh (LISTEN)
sshd 2877 root 4u IPv6 6707 TCP *:ssh (LISTEN)
If nothing is listening you won't get any output at all. Try restarting the ftp daemon if you haven't already and re-run the command. If that doesn't fix it, look into your config file.
If it is listening, you might want to make sure iptables is allowing that traffic into the server. You can either post your iptables output here, try telnet'ing to port 91 from a remote machine, or port scanning the box with nmap assuming that is legal where you are.
If the server is listening and remote connections are allowed through the firewall, it is going to be an issue with FTP and control ports which can be a bit tricky. Are you running active or passive FTP?
the ssh port is configured in /etc/ssh/sshd_config. Specifically, the "Port" line. This will require you to restart the daemon and because the port is changing, you will get booted if remotely administrating the server. Don't forget to make the proper changes to iptables as well so you can get back in.
Last edited by settntrenz; 08-10-2009 at 02:12 AM.
A good starting point might be to determine whether or not the server is listening on the new port.
Code:
lsof -i tcp:91
I think you mentioned you are using ubuntu, in that case add sudo in front of lsof.
Code:
sudo lsof -i tcp:91
If it is listening, you might want to make sure iptables is allowing that traffic into the server. You can either post your iptables output here, try telnet'ing to port 91 from a remote machine, or port scanning the box with nmap assuming that is legal where you are.
If the server is listening and remote connections are allowed through the firewall, it is going to be an issue with FTP and control ports which can be a bit tricky. Are you running active or passive FTP?
the ssh port is configured in /etc/ssh/sshd_config. Specifically, the "Port" line. This will require you to restart the daemon and because the port is changing, you will get booted if remotely administrating the server. Don't forget to make the proper changes to iptables as well so you can get back in.
well here are my results: from telnet
johnh10000@tux:~$ telnet tux2.isa-geek.org 91
Trying 82.6.134.175...
telnet: Unable to connect to remote host: Connection refused
johnh10000@tux:~$ telnet tux2.isa-geek.org 90
Trying 82.6.134.175...
telnet: Unable to connect to remote host: Connection refused
johnh10000@tux:~$
and from lsof:
root@tux2:/home# lsof -i tcp:90
root@tux2:/home# lsof -i tcp:91
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
inetutils 2461 root 5u IPv6 5925 TCP *:ftp (LISTEN)
root@tux2:/home#
which sugests the iptables need to be updated. A clue how to do this would be nice please. I'll change my mail notifier, it didn't tell me you'd replied
Status: Waiting to retry...
Status: Resolving address of tux2.isa-geek.org
Status: Connecting to 82.6.134.175:90...
Error: Connection attempt interrupted by user
Status: Resolving address of tux2.isa-geek.org
Status: Connecting to 82.6.134.175:91...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error: Could not connect to server
Status: Waiting to retry...
Error: Connection attempt interrupted by user
Status: Waiting to retry...
Status: Resolving address of tux2.isa-geek.org
Status: Connecting to 82.6.134.175:90...
Error: Connection attempt interrupted by user
Status: Resolving address of tux2.isa-geek.org
Status: Connecting to 82.6.134.175:91...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error: Could not connect to server
Status: Waiting to retry...
Error: Connection attempt interrupted by user
and from lsof:
root@tux2:/home# lsof -i tcp:90
root@tux2:/home# lsof -i tcp:91
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
inetutils 2461 root 5u IPv6 5925 TCP *:ftp (LISTEN)
I just noticed that your lsof output only mentions listening on an ivp6 address. Sorry I missed that earlier. Looks like the problem might be with the FTP configuration. I'm not super familiar with inetutils on ubuntu. I'm going to play around with it and see if I can install and get it listening on a non-standard port. I'll get back to you.
I just noticed that your lsof output only mentions listening on an ivp6 address. Sorry I missed that earlier. Looks like the problem might be with the FTP configuration. I'm not super familiar with inetutils on ubuntu. I'm going to play around with it and see if I can install and get it listening on a non-standard port. I'll get back to you.
As you suggested, it was a proftpd config problem. now using vsftpd, and it works, how I want it.
cheers
After messing with inetutils I was going to recommend that you switched to vsftpd. It's much easier (in my opinion) to work with. Glad it is working for you!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.