Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-04-2004, 11:26 AM   #1
LQ Newbie
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
telnet through lan

im a bit new to linux and networking, about three days in fact
but i know a little bit from reading some of the stuff on
aboutdebian dot com-very helpfull site
n e way,
ive got a small office network
4 workstations
1 firewall running debian linux
dsl connection (non-static ip)
otherstuff which i dont think is important

i want to telnet to the firewall from my windows pc, so i run command and get:

Connecting to not open connection to the host, on port 23.
no connection could be made because the target machine actively refused it

ive tried it on different ports but it still doesnt work.
(i didnt even know what a port or an ip address was last wednesday)

so how do you set up the linux box to allow this kind of thing?
it must only be for the internal nic for the moment because of security and things.

am i right in thinking telnet will give me a virtual console on the linux box, so as i can do anything i could if i was kneeling down in the dark dusty cupboard where the linux box is, but from the luxury of my own desk?

oh a program called tightvnc is running and works if that helps.

is it something to do with ipchains? does this allow me to specify which ports can deal with which services?

thanks for your time.
Old 10-04-2004, 11:57 AM   #2
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Did you install the telnet server (service) on the Linux box. By default, telnet is not installed.
In fact, you should not use telnet... use SSH. SSH (secure shell) is an encrypted connection.

SSHd should be installed on your Linux box. It runs on port 22.

On your windows PC, use PuTTY as your SSH client.

Most likely your firewall is on or the sshd service is not running.
Go to your linux box, login as root. To display your Firewall rules, type:
iptables -vL
To install (or upgrade) ssh, type:
apt-get install ssh
Also, you can start, stop, restart sshd with the following command
/etc/init.d/ssh start
Old 10-04-2004, 12:20 PM   #3
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 313

Rep: Reputation: 40
telnet to firewall

hello celadoreuk

I would go with what Mathieu posted. In the past I used telnet because thats what I always did. But this web site has caused me to re-think and go with ssh.

ssh is just like telnet in that you access another unit with the command (ssh ip_address_unit). If you have nothing but trusted units in your network, that only you operate, telnet may be ok. <let the flames begin.>

If you are using iptables for your firewall two lines added to it should get ssh to access that unit. For telnet to work the number would be 23 in place of 22
These two lines show that eth1 faces your internel LAN.

iptables -A INPUT -p tcp -i eth1 --dport 22 -j ACCEPT
iptables -A INPUT -p udp -i eth1 --dport 22 -j ACCEPT

Good Luck.
Old 10-04-2004, 02:14 PM   #4
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
thanks a lot guys, im impressed with the speedy reply
very helpfull/informative
but ive got another problem
im currently running putty
and i get a log in, so i type root, and the password, but it says access denied
this is a whole step farther than before
because doesnt this mean im actually connected.
sshd thing seems to be running on the linux box because
ps ax cmd lists it

i know the password is right, i logged in a few seconds ago in the actual box.

also, i was inadvertantly helped with another thing
if im wrong please tell me

iptables -A INPUT -p tcp -i eth1 --dport 22 -j ACCEPT
iptables -A INPUT -p udp -i eth1 --dport 22 -j ACCEPT

this allows ports to be used through the eth1 network card?
where tcp or udp is the protocol

iptables -A INPUT -p ftp -i ppp0 --dport 21 -j ACCEPT
would allow internet ftp through port 21?
(i found out that although im running some sort of cable thing, its going through a
device which looks like a frog, so its classed as a modem and therefore ppp0?)

that iptables -vL is a headache
i stuck | more on the end, but i cant understand very much of it.

sorry for asking 100 questions in one post, but im learning from scratch.
help with any of them would be much appreciated
Old 10-04-2004, 02:31 PM   #5
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
sorry i was being an idiot
i managed to get putty working fine
im too embarrassed to say why
cough cough(misspelled password)
so my thanks go out for that


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
Telnet on LAN not working oPi Linux - Newbie 7 02-03-2005 08:25 AM
telnet and lan? hellonoam Linux - Networking 6 11-04-2004 04:48 AM
No telnet from LAN into RH7.1 box mcbleyerveld Linux - Networking 4 08-27-2004 09:42 AM
can not telnet localhost 25 but telnet 25 exper Linux - Software 0 02-25-2004 05:13 AM
How do I Telnet (via the web) to a linux box on a Lan.. Simon W Linux - Networking 6 04-15-2002 09:29 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration