LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-08-2010, 08:01 PM   #1
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Rep: Reputation: 17
Unhappy 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!
 
Old 03-08-2010, 08:05 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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

Last edited by frieza; 03-08-2010 at 08:07 PM.
 
Old 03-08-2010, 11:35 PM   #3
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
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
 
Old 03-09-2010, 01:10 AM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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)
 
Old 03-09-2010, 07:01 AM   #5
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
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?
 
Old 03-09-2010, 07:17 AM   #6
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
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
 
Old 03-09-2010, 07:45 AM   #7
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
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.

Last edited by bret381; 03-09-2010 at 07:46 AM.
 
Old 03-09-2010, 12:04 PM   #8
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
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...
 
Old 03-09-2010, 03:33 PM   #9
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
/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?
 
Old 03-09-2010, 03:40 PM   #10
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
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.

Last edited by bret381; 03-09-2010 at 03:41 PM.
 
Old 03-09-2010, 03:52 PM   #11
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
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.
 
Old 03-09-2010, 04:09 PM   #12
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
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.
 
Old 03-09-2010, 04:17 PM   #13
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
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
$

Last edited by KZeeSoft; 03-09-2010 at 04:25 PM. Reason: additions
 
Old 03-09-2010, 04:45 PM   #14
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
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
 
Old 03-09-2010, 04:56 PM   #15
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
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?
 
  


Reply



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
anybody familiar with this error "Xlib: connection to ":0.0" refused by server" ? rajnivanza Linux - Newbie 3 03-22-2009 05:10 PM
ircd.conf: "Connection failed. Error: Connection refused" hamish Linux - Software 3 03-10-2005 07:23 AM
SSH PuTTy gives "connection refused" Sathington Linux - Networking 5 03-18-2004 05:10 AM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 07:49 AM
lp filename yields "cannot open connection to localhost - Connection refused" jjge Linux - General 3 12-28-2003 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:17 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
Open Source Consulting | Domain Registration