LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-23-2006, 09:56 PM   #1
gtkuntz
LQ Newbie
 
Registered: Feb 2006
Distribution: Fedora
Posts: 13

Rep: Reputation: 0
Question Allowing only Internal Telnet


Hi all.. I know just enough about linux to think I know what I'm doing
Suggestions/Help please.

I have a home network that I want to allow telnet access only interally to my network. I want to block all telnet/ftp from outside (which is working). I have iptables configured to only allow SSH incoming. I am trying to allow telnet from inside my network to my server, but not in. No matter what I have tried, i get connection refused.

my internal network is 172.18.122.0/24

I am not running xinetd that I can tell.
chkconfig --list telnet = On
chkconfig --list xinet or xinetd gives me error like its not installed, but I shouldnt need it should I ?

Shouldn't I just be able to modify my iptables to allow incoming ?


ifconfig
--------
eth0 Link encap:Ethernet
inet6 addr: fe80::2e0:4cff:feea:7d03/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:471956 errors:0 dropped:0 overruns:0 frame:0
TX packets:374068 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:438577353 (418.2 MiB) TX bytes:55813109 (53.2 MiB)
Interrupt:10 Base address:0x6000

eth1 Link encap:Ethernet
inet addr:172.18.122.2 Bcast:172.18.122.255 Mask:255.255.255.0
inet6 addr: fe80::260:8ff:fe53:8e34/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:470014 errors:0 dropped:0 overruns:0 frame:0
TX packets:571881 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:79881915 (76.1 MiB) TX bytes:497697508 (474.6 MiB)
Interrupt:10 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1682 errors:0 dropped:0 overruns:0 frame:0
TX packets:1682 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1737602 (1.6 MiB) TX bytes:1737602 (1.6 MiB)


iptables -L
------------

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- 172.18.122.0/24 anywhere state NEW tcp dpt:telnet
ACCEPT tcp -- xxx.xx.xx.xxx anywhere state NEW tcp dpt:ssh
LOG tcp -- anywhere anywhere state NEW tcp dpt:telnet LOG level warning
REJECT tcp -- anywhere anywhere state NEW tcp dpt:telnet reject-with icmp-port-unreachable
LOG tcp -- anywhere anywhere state NEW tcp dpt:ssh LOG level warning
REJECT tcp -- anywhere anywhere state NEW tcp dpt:ssh reject-with icmp-port-unreachable
LOG tcp -- anywhere anywhere state NEW tcp dpt:ftp LOG level warning
REJECT tcp -- anywhere anywhere state NEW tcp dpt:ftp reject-with icmp-port-unreachable
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited


My kernel is Fedora Kernel 2.6.15-1.1831_FC4-i686


Any help would be appreciated!

Greg
 
Old 02-24-2006, 03:53 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492

Rep: Reputation: 50
are you sure the telnet daemon is running??

do 'ps -ef|grep -i telnetd'.

if it is then try and telnet from the machine to itself and see what happens....
 
Old 02-24-2006, 12:07 PM   #3
gtkuntz
LQ Newbie
 
Registered: Feb 2006
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
Telnet daemon is not running..

but I can type telnet...

telnet> open 172.18.122.2
Trying 172.18.122.2...
telnet: connect to address 172.18.122.2: Connection refused
telnet: Unable to connect to remote host: Connection refused
telnet>
 
Old 02-24-2006, 12:35 PM   #4
geeman2.0
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
You need the telnet daemon to be running on any machine you wish to be able to connect to.
The daemon is what actually accepts the telnet connection.
 
Old 02-24-2006, 12:41 PM   #5
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492

Rep: Reputation: 50
actually i was talking bollocks. inetd should start telent if it recieves a connection request on port 23.

however, only if it's enabled in /etc/inetd.conf
 
Old 02-24-2006, 01:23 PM   #6
gtkuntz
LQ Newbie
 
Registered: Feb 2006
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
i have a krb5-telnet in /etc/xinetd/, which is disable=yes, but i created a telnet in that directory that has:

service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
server = /usr/sbin/in.telnetd
only_from = 172.18.122.0/24
log_on_failure += USERID
no_access = 10.0.1.0/24
log_on_success += PID HOST EXIT
}


Should I be using the krb5-telnet instead ?

Thx for the replies...
 
Old 02-24-2006, 08:35 PM   #7
gtkuntz
LQ Newbie
 
Registered: Feb 2006
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
i've tried enabling the krb5-telnet, still doesn't work.

I know, when I first configured this server, I was able to telnet in from work. Then I blocked it with iptables rules, so I know it worked before.

Its GOT to be something simple, that I'm overlooking...

The reason I want to be able to telnet interally, is I have a remote computer that I need to be able to use reflections x to telnet into, and start an xserver app..
 
Old 02-25-2006, 04:54 AM   #8
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492

Rep: Reputation: 50
shouldnt you be using ssh for this, if you've got reflections X???
 
Old 02-25-2006, 03:18 PM   #9
gtkuntz
LQ Newbie
 
Registered: Feb 2006
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
i cannot ssh with wrq reflection. evidently don't have that part of the software.

Regardless, i am almost 100% sure its something to do w/my firewall, as I stated above, it used to work until I started blocking telnet from the outside world.
 
  


Reply


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
Installation of internal HP DAT 40i DDS internal tape drive netkepala Linux - Hardware 3 11-08-2004 12:22 PM
How do I setup telnet on Fedorac1 so I can telnet to it from winxp? mman49 Fedora 6 05-02-2004 12:40 PM
can not telnet localhost 25 but telnet dowell.exper.dynserv.com 25 exper Linux - Software 0 02-25-2004 05:13 AM
redhat 9: sendmail port 25 not allowing outside telnet aagha Linux - Networking 4 08-28-2003 11:23 PM
Help a Newb.. allowing root to telnet and ftp in. shanebuss Linux - General 29 01-15-2003 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:11 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