LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Putty connections "Connection refused" ...easy answer? (https://www.linuxquestions.org/questions/linux-server-73/putty-connections-connection-refused-easy-answer-794082/)

KZeeSoft 03-08-2010 08:01 PM

Putty connections "Connection refused" ...easy answer?
 
I have setup my server with Debian Lenny and using ISPConfig 3. I followed the tutorial by Falko over on howtoforge, but I cannot connect to my server remotely via putty, ftp, or even ispconfig using a web browser and port 8080.

The only way I can connect is via a computer inside my network and using the server's ip address. I have setup my server to be a DMZ host so it is fully exposed and all ports opened, (my website pops up over the 'net) but I still cannot log into ispconfig 3, ftp, or putty. I would really like to remotely administer this machine so I can put it in a secure location instead of my wet basement, so remoting in is a must.

Any insight?

Give me commands you would like to see output of and I will post the results. Thanks everyone!

frieza 03-08-2010 08:05 PM

if you are talking about accessing it via the internet then you need to configure your router (assuming you have a router) to forward requests on the necessary ports from your internet connection to the ip address of the server
how to do this varies depending on what make and model of router and the firmware that router is using however but most home use routers have a web based interface available from your internal network
usually on 192.168.0.1, 192.168.1.1, or some other similar address depending on the make/model of the router
also note to do this properly you need to configure your server to a static ip if this hasn't been done already
welcome to lq btw

KZeeSoft 03-08-2010 11:35 PM

Router is OK
 
Thanks for the warm welcome =)

My router is indeed configured properly (I have my server set with a static ip), and that ip is set as a DMZ Host (all ports open to that IP). I also tried individually forwarding those ports in a port forwarding rule contained in the firewall setting.

I double checked just to be sure, but the settings are looking good in there. In the post, I mentioned how I can see the website files from outside my network with no problem, I just cant seem to connect via putty or using the ISPConfig 3 dashboard located on mysite.mydomain.com:8080

Any other ideas?

=) Thanks again

frieza 03-09-2010 01:10 AM

you could try forwarding port 22 and SSHing into the machine via putty, if that works ssh is similar to telnet but encrypted, and can create a tunnel to forward other protocols, including X (the gui)

KZeeSoft 03-09-2010 07:01 AM

All ports are forwarded already
 
All ports are forwarded via a DMZ Host in my router. Every and any port should work, but when I try to connect I get the error:

"Connection refused"

Does that help define the problem?

reed9 03-09-2010 07:17 AM

Quote:

I just cant seem to connect via putty or using the ISPConfig 3 dashboard located on mysite.mydomain.com:8080
Does the client computer have a way to look up mysite.mydomain.com? ie, is that registered with a domain name server your client computer can access?

I use dyndns.org for that purpose.

Also, do you have /etc/hosts.allow configured to allow the connections?
http://www.redhat.com/docs/manuals/l...rs-access.html

bret381 03-09-2010 07:45 AM

I agree with reed9. Check your /etc/hosts.allow and hosts.deny files. I had a similar problem. My hosts.deny was set to all and I got the same error. :)

KZeeSoft 03-09-2010 12:04 PM

godaddy
 
I currently use GoDaddy.com to purchase my domains, and I manage the DNS from their console. I have pointed my domains (I have 2 atm) to my routers WAN address and my router forwards all traffic to my server's LAN address via a DMZ Host.

As for the file you want me to check, will post back later on when I am able to get to the server. I cannot access the server remotely (hence why I humbly ask here) =)

More to come later...

KZeeSoft 03-09-2010 03:33 PM

/etc/hosts.allow

Has everything commented out using "#" at the beginning of every line.

/etc/hosts.deny

Everything commented out as well


So now that there are no entries in either file, what next?

Do I place entries in myself? If so, how would I do that?

bret381 03-09-2010 03:40 PM

just for laughs, try connecting using the IP address to your router and bypass your domain name with GoDaddy.
Code:

ssh -l username xxx.xxx.xxx.xxx
It may be a problem with the host and not the server.

*EDIT
Also, where are you trying to connect from? The ports you are trying to access may be blocked by a firewall from whatever LAN you are trying to access your server from.

KZeeSoft 03-09-2010 03:52 PM

OK, on my mac here (on the same LAN as my server) I am able to access the server via terminal and the command you displayed (using the LAN address)

When I try to connect to the server via the ipadress of the router, I get this:

$ ssh -l root 12.345.678.910
ssh: connect to host 12.345.678.910 port 22: Connection refused
$

I understand from previous discussions that my router may not be "looping back" and thats why I can't adress the websites by name from inside the LAN. I still didnt figure out how to fix that either.

bret381 03-09-2010 04:09 PM

that is strange. What type of router do you have?

try taking it off the dmz ( I know, I know ) On my router ( A D-Link ) I have a virtual server page. I can forward a specific port to a paticular IP address on the LAN.

Just trying to nail down the particulars here. It seems to be a problem with the configuration of the router.

KZeeSoft 03-09-2010 04:17 PM

I have an Actiontec MI424-WR

I disabled the DMZ, enabled port forwarding with the following rules:

HTTP - TCP Any -> 80
IMAP - TCP Any -> 143
POP3 - TCP Any -> 110
SMTP - TCP Any -> 25
ISP Config - TCP 8080 -> 8080
Telnet - TCP Any -> 23
FTP - TCP Any -> 21
HTTPS - TCP Any -> 443
Telnet SSL - TCP Any -> 992
SSH - TCP Any -> 22

I have other router options in the firewall config such as:


Main
General
Access Control
Port Forwarding
DMZ Host
Port Triggering
Remote Administration
Static NAT
Advanced Filtering
Security Log

*EDIT*

Same issue with port forwarding on instead of the DMZ. via terminal on my mac inside the same LAN as the server I get:

$ ssh -l root 12.345.678.910
ssh: connect to host 12.345.678.910 port 22: Connection refused
$

bret381 03-09-2010 04:45 PM

hmmm, that is strange. I'm not real sure where to go from here. It seems to be a problem with the router though.

have a look here:
http://portforward.com/english/route...424-WR/SSH.htm

Not to say you don't know how to configure your router or anything, but there is step by step as well as a port checker tool at the bottom of the page.

It's worth a shot

KZeeSoft 03-09-2010 04:56 PM

From what they say on the page, my router is configured properly.

I do appreciate your help, the site was helpful to double check my settings.

Any other ideas anyone?

Anyone familiar with this "loopback" issue where you cannot access the websites on the same LAN as the server?


All times are GMT -5. The time now is 02:19 AM.