Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Am trying to connect to the server from a Windows 2000 machine (for a couple of different applications).
Telnet is running on the server (I can self-connect to telnet on the server). If I try to connect from the Win box, I always get a "An existing connection was forcibly closed by the remote host" message.
Wrote a simple TestPort routine in the Win box -- feed it an IP address and list of ports and it will try to open a socket connection to each port.
Every port returns the same error as above (usually after about a 30 second delay).
On the Linux box netstat shows listeners active for all the ports.
Both machines are on the same sub-net, and I'm using IP addresses instead of names, so not going through any DNS. Both machines can ping each other.
I'm a newbie to Linux, and suspect it's some type of authorization issue, but have been trolling the Web all day without coming up with an answer. Appreciate any help.
If you get that for all ports, it may be a firewall on the Linux box. Have you used nmap from http://www.insecure.org/nmap/ before? There is a Windows version so you can scan the Linux box from Windows and see what ports are open.
One the Linux box, have a look in /etc/init.d for a file called iptables (or firewall, or something like that). Try, as root, running service iptables stop and then run nmap again (or just try and telnet to the box).
It may be that telnet is disabled - it's not the best choice for remote access. Have you tried ssh?
The standard telnet port is 23 and the standard ssh port is 22. If you're using iptables, you can use something like:
For telnet
Code:
iptables -t filter -A INPUT -p TCP --dport 23 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -t filter -A OUTPUT -p TCP --sport 23 -m state --state ESTABLISHED -j ACCEPT
For SSH
Code:
iptables -t filter -A INPUT -p TCP --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -t filter -A OUTPUT -p TCP --sport 22 -m state --state ESTABLISHED -j ACCEPT
That can be refined to only allow new connections with SYN set, or only connections from certain IPs, etc. Also, if you have more than one network card in the box, you should specify the interface.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.