Re: version 2.5.2 bug?

"Rob Wentworth" <rw-CBFwbMb/FCFWk0Htik3J/[email protected]> Wed, 29 Oct 2003 16:32:01 -0600
Newsgroups gmane.comp.security.zebedee.general
Organization SkyPoint Communications
Message-ID <002d01c39e6c$7d458330$0d01a8c0@GeekMaster>
It appears that my zebedee "persistent" reverse tunnel works okay if I do
NOT run the server as a WinXP service or detach from console.

If I do NOT have a console window, I can only send ONE e-mail through the
tunnel.

I see in the mail list archive that this is a known problem in 2.5.1 that
apparently was not fixed in 2.5.2:
-----
From: <neil-PK6SPyD/[email protected]>
 RE: Running Zebedee as a Service with listenmode/c lienthost does not work
2003-09-15 09:19
 Hi,

 > OS: Windows XP
 > When I run Zebedee Server as a service it appears to ignore the
 > "clienthost" entry in the config file and wait for a connection
 > from the Client instead of initiating the connection itself...

 It looks like you've got a geniune bug there. There's currently no way to
 run it in "reverse" as a service (although that would have otherwise been a
 good way to get it to restart once the connecttimeout had expired). I'll
fix
 it in the next release.

  Regards,
   Neil

----- Original Message ----- 
From: "Rob Wentworth" <rw-CBFwbMb/FCFWk0Htik3J/[email protected]>
To: <[email protected]>
Sent: Monday, October 27, 2003 9:07 PM
Subject: [Zebedee-talk] version 2.5.2 bug?


> 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: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/