[lug] Socket Error

David dajo at frii.com
Thu Aug 23 13:29:43 MDT 2001


I think that I have a Linux (firewall?, or ?) configuration error; but
it needs a little background explanation.

I am successfully accessing a remote machine over the net using a
socket, which is established by a function call in a programme; the
calling source code sees the socket access as a byte stream.  I have a
lot of development to do and decided to create a stream by accessing a
local file instead of the net; there is a standard call in the
programming language to do this kind of access.  The changes in the
function call are trivially different for the two cases, which makes
me think that I have a Linux system problem.  Also, the error messages
strongly indicate something outside the programme.  I am hoping that
someone will recognise symptoms of a Linux problem.

If the file does not exist I get this; pretty good: "No such file or
directory". 
Error: creating a socket and connecting to remote socket nil resulted
       in error (code 2): No such file or directory.

If the file exists I get this, even if the file permissions are wide
open 777 all the way from /
Error: "Connection refused" (errno 111) occured while
       creating a socket and connecting to remote socket.

Since I am using a socket I wonder if my firewall, or ?, is getting in
the way.

# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
#       firewall; such entries will *not* be listed here.
:input ACCEPT
:forward ACCEPT
:output ACCEPT
-A input -s 0/0 -d 0/0 -i lo -j ACCEPT
-A input -s 216.17.128.1 53 -d 0/0 -p udp -j ACCEPT
-A input -s 216.17.128.2 53 -d 0/0 -p udp -j ACCEPT
-A input -s 0/0 -d 0/0 -p tcp -y -j REJECT
-A input -s 0/0 -d 0/0 -p udp -j REJECT

dajo



More information about the LUG mailing list