Discussion Locked

Using SSH/telnet w/ cable modem & router

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm running Redhat 9.0 on an older computer, and I use a router to log onto the internet with an Jaguar Mac, a Win2000 box, and a Win XP box. The linux box accesses the internet fine, but when I try to run an SSH or telnet server, I can only connect through the linux box; not even the other computers on the router will read it. A DNS will not run on it. How can I configure the router (Linksys 4-port router) and the Redhat computer to run these servers accessible to computers on the network and accessible to computers outside of the network (such as at work or school).

Thanks for your help.

John

2 replies

by km9_2k2

John;

I'm not 100% clear on the question you have but I'll give it my best shot.

Have you set up the IPTABLES firewall on the Linux system to accept either telnet or ssh requests from the other systems ? First check by typing: iptables -L -n

If you don't see anything specifically allowing access via port 22 or 23 (SSH & telnet respectively) type the following two commands while logged in as root:

iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p udp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 23 -j ACCEPT
iptables -A INPUT -p udp --dport 23 -j ACCEPT

Try iptables -L -n again and you should see something like this:

target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:23
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:23
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:22

Now, if you're trying to gain access to your linux system from outside your home, you will need to set up the linux machine as your DMZ system. This opens that machine up to external access and a correctly configured iptables firewall should protect you from hackers. I personally have telnet disabled. SSH is the only way in.

Good luck !

- Matt

by evoshaolin

Also you will want to check your LinkSYS 4 port router for enabled ports and disabled ports. You may have to enable the SSH port on the router for external access of course you want to make sure your security settings for the other PCs as well as your Linux box are configured for your needs.

I do not recommend using a LinkSys router I have found the firmware updates don't work very well and have found articles on them having open ports in areas they are supposed to be locked down (disabled). I prefer Cisco, it's more expensive by=ut the most reliable. You get what you pay for.

Don't leave any holes open otherwise you may have some unexpected visitors within your network. I disabled ICMP, telnet, and mail on my Linux box. I only have SSH login access enabled and that's it.

This discussion is closed to new replies.