This project has moved and is read-only. For the latest updates, please go here.

Error! Could not listen to TCP

Mar 26, 2013 at 5:55 PM

I am at the first step of configuring Barba Tunnel server on an XP box. What I have done so far is to install WinpkFilter and change some settings in ini files. When I start BarbaTunnel.exe, I get:

Barba Server Started...
Version: 6.4
FilterDriver: WinpkFilter
Adapter: Local Area Connection
HttpHost: TID: 3ec, Listening to TCP
HttpHost: TID: 3ec, Error! Could not listen to TCP The requested address is not valid in its context.

I can ping the box from the XP box and there is a service running on port 443.

Here is how the ini files look like:

------------- BarbaTunnel.ini ---------------



--------------------------- config.ini ---------------------


I can't find much documentation about the "ServerAddress" setting and thought it should be the IP address of the real server (web server in this case), is that right?

Could someone point out what wrong in my configuration is, please?


Mar 26, 2013 at 9:28 PM
It look you are using http tunnel for port 443. I think your IIS or another application already binding this port. I recommend you use another port for http tunnel such 8080. The best port is 80 but you need unbind IIS or any service that use your specified port.
Mar 27, 2013 at 11:26 AM
Hi BarbaCoder,

Let's me clarify the configuration:

Barba Tunnel is installed on an XP box, the IP address of that XP box doesn't matter. is the IP address of another box (OS doesn't matter). On the box there is a web server listening on port 443. There is nothing wrong with the web server as I can connect to it normally.

The XP box on which Barba Tunnel is tried to run as a server is a virtual machine. There is no firewall, anti-virus or what so ever that could block any port.

Second question: As far as I understand, Barba Tunnel does nothing but sits on a network card and examines packets passing through that card. If the IP address/port/protocol of a packet matches what is specified in config file, Barba will encrypt (client) or decrypt (server) the packet in order to hide some information from 3rd party blocking mechanism, e.g. proxy of firewall, is that correct?

If my understanding was correct, I just don't understand why Barba needs to connect to any server. The error message "Error! Could not listen to..." implies that Barba is trying to establish some kind of connection. Could you explain, please?


Mar 28, 2013 at 11:39 AM
Yes, you understood right, but in http tunnel Barbatunnel establish standard tcp connection and your IIS already reserve that port.
You should change barbatunnel port or disable IIS on that port.
IIS bind that port for https protocol by by default.
Mar 28, 2013 at 5:40 PM
Hi BarbaCoder,

Whatever port number I put in, the result is the same. However if I provide a non-existing server, e.g. and TunnelPorts=12345 it was happy. So I still do not understand the logic behind it.

I very much appreciate your willingness to help. Your software is very promising but believe me, without a good documentation and if people can't use it, it is not helpful, just a bit of interesting software.

Would you mind updating the documentation section with explanation why a setting must be what it expected to be. Even better if there is an axample config files with some diagrams of how the server and client is connected using that example ini files, it would hep many people, not just me, to understand how to configure it correctly.

Sorry if I was a pain.


Mar 28, 2013 at 8:19 PM
Dear vda
I understand the importance of documentation, but network is very very wide area, and when an unknown issue occur such as your case it is very hard to solve it.
Your server just could not start listening to a port with standard socket API. Actually this error raised by Microsoft socket API, so how it should be documented when the reason is unknown for me?

I would be happy if you document the issue and resolution if you solve it.