Advertisement

Allowing remote connections

Started by October 12, 2002 03:58 PM
0 comments, last by symphony_in_c 22 years, 3 months ago
Hi, I''ve written a small client/server program under Linux using network sockets, but the server program will only accept connections from 127.0.0.1. The server listens on a socket bound to port 20258, but refuses the connection if it from a remote computer. I''ve tried running the server as root but this makes no difference. Is there a config file somewhere I need to toy with?
Sounds like either

a) Your routes are wrong
b) You''ve got problems with your /etc/hosts , /etc/hosts.allow , /etc/hosts.deny files
c) You''re using NAT / Firewall, and haven''t opened up the ports

As you haven''t provided much more info, I''m afraid I can''t be sure if the above are the problem or if its something else.

Can you ping into you system from another machine / ping another machine from your system?

I haven''t done much with this, but you should look in the man
pages to check you''re not denying all hosts access

(try man hosts , or man 5 hosts_access)

Also, have you got any other applications that use sockets? do they work okay?

If you investigate these and still draw a blank, then you might want to ask again, but with information on your investigations.


Stu M

This topic is closed to new replies.

Advertisement