version 2.5.2 bug?

"Rob Wentworth" <rw-CBFwbMb/FCFWk0Htik3J/[email protected]> Mon, 27 Oct 2003 21:07:49 -0600
Newsgroups gmane.comp.security.zebedee.general
Organization SkyPoint Communications
Message-ID <023b01c39d00$ac415730$0d01a8c0@GeekMaster>
The following is a test setup, on which I will base a real-world
configuration.

I am using zebedee 2.5.2 in reverse-tunnel mode, to run a mailserver on a
dynamic IP address behind a firewall (with permission).

My DNS MX record points at my static IP hosted web server, where the zebedee
server listens for connections from the client.

It works until mail goes through the tunnel to my mail server ONE time. The
second time mail is pushed through, the server gets "Bad file descriptor"
errors.

Shutting down and restarting the server allows ONE more message through,
etc.

*** Question 1:  Am I be running the right version of zebedee for this task?

*** Question 2:  Am I missing anything in my configs (the values were
shortened for testing)?

Here is my server config (zebedee -f <configfile> from my Win XP dynamic IP
mailserver):
#-----
# Zebedee reverse-tunnel server config.
# Server connects to client listening on static IP port 6100.
# Server passes connects from tunnel to application servers.
#-----
server true # server
serverport 6100 # zebedee port
clienthost 199.86.xx.xx # connect to client at static IP   <== (altered here
to keep hackers away).
connectattempts 65535 # connect retries before server exits
#serverconnecttimeout 30 # seconds between connect retries
serverconnecttimeout 10 # seconds between connect retries
#acceptconnecttimeout 300 # wait up to 5 mins for protocol exchange
acceptconnecttimeout 60 # wait up to 5 mins for protocol exchange
targetconnecttimeout 300 # abort hung target connects at 5 mins
detached true # run detached from terminal
ipmode both # mixed TCP/UDP mode
compression zlib:9 # maximum zlib compression
maxbufsize 16383 # maximum possible buffer size
target 192.168.1.0/24:25 # allow SMTP to 192.168.1.0-255
target localhost # last target is default
timestamplog true # timestamp logs
verbosity 5 # log message verbosity (1-5)
logfile 'C:\progra~1\zebedee\server.log' # log filename
include './private.key' # private key file
checkidfile './public.keys' # validate client identities
-----

Here is a chunk of my server log:
-----
zebedee(2560/1264): 2003-10-27-20:09:29:     readMessage: message size = 6,
encrypted, uncompressed
zebedee(2560/1264): 2003-10-27-20:09:29:      readData: receiving 10 of 10
zebedee(2560/1264): 2003-10-27-20:09:29:      readData: read 10 byte(s)
zebedee(2560/1264): 2003-10-27-20:09:29:      expected checksum 0x243f24d1,
calculated checksum 0x243f24d1
zebedee(2560/1264): 2003-10-27-20:09:29:      writeData: sending 6 of 6
zebedee(2560/1264): 2003-10-27-20:09:29:      writeData: sent 6 byte(s)
zebedee(2560/1264): 2003-10-27-20:09:29:      sent 6 bytes to local socket
176
zebedee(2560/1264): 2003-10-27-20:09:29:      read 17 bytes from local
socket 176
zebedee(2560/1264): 2003-10-27-20:09:29:      calculated checksum 0x8886399f
zebedee(2560/1264): 2003-10-27-20:09:29:     writeMessage: message size =
17, encrypted, uncompressed
zebedee(2560/1264): 2003-10-27-20:09:29:      writeData: sending 23 of 23
zebedee(2560/1264): 2003-10-27-20:09:29:      writeData: sent 23 byte(s)
zebedee(2560/1264): 2003-10-27-20:09:29:    connection closed or timed out
zebedee(2560/1264): 2003-10-27-20:09:29:   read 597 bytes (779 expanded) in
10 messages
zebedee(2560/1264): 2003-10-27-20:09:29:   wrote 419 bytes (465 expanded) in
12 messages
zebedee(2560/1264): 2003-10-27-20:09:29:  connection closed
zebedee(2560/2996): 2003-10-27-20:09:38:   initiating connection back to
client at 199.86.42.17:6100
zebedee(2560/2996): 2003-10-27-20:09:38:    failed to connect back to client
at 199.86.42.17:6100: (Bad file descriptor)
zebedee(2560/2996): 2003-10-27-20:09:38:     sleeping for 10 seconds
zebedee(2560/2996): 2003-10-27-20:09:48:   initiating connection back to
client at 199.86.42.17:6100
zebedee(2560/2996): 2003-10-27-20:09:48:    failed to connect back to client
at 199.86.42.17:6100: (Bad file descriptor)
zebedee(2560/2996): 2003-10-27-20:09:48:     sleeping for 10 seconds
zebedee(2560/2996): 2003-10-27-20:09:58:   initiating connection back to
client at 199.86.42.17:6100
zebedee(2560/2996): 2003-10-27-20:09:58:    failed to connect back to client
at 199.86.42.17:6100: (Bad file descriptor)
zebedee(2560/2996): 2003-10-27-20:09:58:     sleeping for 10 seconds
zebedee(2560/2996): 2003-10-27-20:10:08:   initiating connection back to
client at 199.86.42.17:6100
zebedee(2560/2996): 2003-10-27-20:10:08:    failed to connect back to client
at 199.86.42.17:6100: (Bad file descriptor)
-----

Here is my client config file (zebedee -f <configfile> running on a freebsd
web server):
#-----
# Zebedee reverse-tunnel client config.
# Client listens on static IP port 6100 for connects from zebedee server.
# Client passes application connects through tunnel to application servers.
#-----
server                  false           # client
serverport              6100            # zebedee port
listenmode              true            # listen for connect from server
#acceptconnecttimeout   65535           # wait up to 18 hrs for server
connect
acceptconnecttimeout    30              # wait up to 30 secs for server
connect
listenip                199.86.42.17    # bind to geekmaster.us website ip
tunnel                  25:*:25         # allow SMTP from any IP
detached                true            # daemon mode
runasuser               "nobody"        # account to use after binding ports
timestamplog            true            # timestamp logs
verbosity               3               # log message verbosity (1-5)
logfile         './geekmaster.us.log'   # log filename
include         './private.key'         # private key file
checkidfile     './public.keys'         # validate client identities
-----

Here is a chunk of my client log (repeats with each server restart and mail
transfer):
-----
zebedee(86011/25632): 2003-10-27-20:11:12:    select returned 1
zebedee(86011/25632): 2003-10-27-20:11:12:  accepted connection from
199.86.41.2
zebedee(86011/25632): 2003-10-27-20:11:12:  waiting for client connection
zebedee(86011/21216): 2003-10-27-20:11:12:    client routine entered
zebedee(86011/21216): 2003-10-27-20:11:12:    client on local port 25
tunnels to target *:25
zebedee(86011/21216): 2003-10-27-20:11:12:    waiting for connection from
server
zebedee(86011/21216): 2003-10-27-20:11:12:    waiting to accept connection
zebedee(86011/21216): 2003-10-27-20:11:12:    accepted connection from
199.86.41.2
zebedee(86011/21216): 2003-10-27-20:11:12:    accepted connection from
server
zebedee(86011/21216): 2003-10-27-20:11:12:    validating server IP address
zebedee(86011/21216): 2003-10-27-20:11:12:    requesting protocol version
0x202
-----

 -  Rob Wentworth, Lead Tech Support Analyst
 --  SkyPoint Communications, www.skypoint.com
 ---  rw-CBFwbMb/FCFWk0Htik3J/[email protected], 763-548-2601



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/