We help IT Professionals succeed at work.

telnet / ftp : "Connection refused"

gljr
gljr asked
on
I have a 3 machine network... two Windows clients and an RH Linux 7.1 server/router.
ipchains does the routing, and the "firewall" can be disabled for the purpose of this
problem (I will be happy to work on that issue at a later date.)

[/root]# ipchains -L
Chain input (policy ACCEPT)
Chain forward (policy ACCEPT)
target            prot  opt           source                                destination                       ports
MASQ           all     ------         192.168.1.0/24                 anywhere                          n/a
Chain output (policy ACCEPT)

the Windows clients are 192.168.1.51 and ...52,  the server is ...50

I am able to access the internet through this config.. except that one or two sites fail if I go directly.. a problem which has been circumvented by using a proxy server provided by my ISP (outside my local network.)  

But the problem is.. I cannot make any ftp session or telnet session to the server.. even from the console!  

Any help is appreciated.

George
Comment
Watch Question

CERTIFIED EXPERT

Commented:
you need to use ftp in passive mode, see PASS command.
Or you need to tell your firewall how to handle ftp sessions, AFAIK this does not work 100% with ipchains, iptables might be a better choice.
CERTIFIED EXPERT

Commented:
What happens to outbound connections from the linux box if you flush all ipchains rules?  Do the still not work?

Also, have you tried just using IP addressess (rather than hostnames) when attempting to connect to remote sites from the linux box?  The winblows machines may use a different DNS scheme than your linux box...

Cheers,
-Jon
Commented:
Are you running xinetd? I believe ftp and telnet are disabled by default.

In the directory '/etc/xinetd.d' you will find two files called 'telnet' and 'wu-ftp'. Each of these files will contain a line like this:' disabled = yes'. Change these to read ' disabled = no' and then restart xinetd: '/etc/rc.d/init.d/xinetd restart'.

You will have to do the above as root.
Oen

Commented:
Hi,
You can change "telnet" service with "ssh" (is new policies of Red Hat):
Ex:
    ssh -l root 192.168.1.51

If the FTP services is not automaticaly started on boot you can activate with :
    ftpd -p 21
If you wish connect at server like root you must modify the ftpacces file(setting the denied user) from etc and comment the field(with "#") where is "root".

Author

Commented:
MFCRich,

I don't know why I didn't see this way back when you wrote it, but I have solved the problem since, and just today put 2+2 together to see that your answer is in fact correct.

Thanks... and here are the points :-)  George

Explore More ContentExplore courses, solutions, and other research materials related to this topic.