EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Delphi 2009 LocalPortForwading Demo - Not Working

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#23384
Posted: 02/09/2013 08:14:51
by arin maulana (Basic support level)
Joined: 02/09/2013
Posts: 3

Dear Eldos,
I've tried Application of SSH Local Port Forwading Demo on my SSH Server, connection succeeded on port 22 heres log info:
-server key received
-authentication succeeded
-SSH connection estabilished

when i'm trying on mozilla browser using manual configuration SOCKs v.5
there's no activity (incoming/outgoing socket or chanel).

i've attach the screenshot here.

regards

maulana


#23385
Posted: 02/09/2013 15:10:55
by Ken Ivanov (EldoS Corp.)

Arin,

If you need the forwarding component to act as a SOCKS proxy (and not as a dumb tunneler), you should explicitly set its UseDynamicForwarding property to true. Please re-check that you did that.
#23386
Posted: 02/11/2013 01:10:18
by arin maulana (Basic support level)
Joined: 02/09/2013
Posts: 3

hi Innokentiy Ivanov,

thank you for your fast reply,
you are right, i should use dinamyc forwarding for that component like the parameter that used in ssh (ssh -D user@host), but when i'm using it app error:
EElSocketError with message 'Socks negotiation failed (error code is 96265)'
what i've todo?

i'll order this component if my project succeeded.

regards

maulana
#23392
Posted: 02/11/2013 02:45:24
by Ken Ivanov (EldoS Corp.)

Arin,

You need to handle the SOCKS-specific events of the component and perform user authentication in it. For security reasons connecting users are not authenticated implicitly.

Code
        void forwarding_OnConnectionSocksConnect(object Sender, TElSSHForwardedConnection Conn, string DestHost, int DestPort, ref bool Allow)
        {
            Allow = true;
        }

        void forwarding_OnConnectionSocksAuthPassword(object Sender, TElSSHForwardedConnection Conn, string Username, string Password, ref bool Accept)
        {
            // check Username and Password here
            Accept = true;
        }

        void forwarding_OnConnectionSocksAuthMethodChoose(object Sender, TElSSHForwardedConnection Conn, int[] AuthMethods, ref int AuthMethod, ref bool Cancel)
        {
            AuthMethod = SBSocket.Unit.saUsercode;
        }
#23393
Posted: 02/11/2013 02:47:45
by Eugene Mayevski (EldoS Corp.)

The error means "SB_SOCKET_ERROR_SOCKS_AUTH_FAILED" (SOCKS authentication has failed).


Sincerely yours
Eugene Mayevski
#23394
Posted: 02/11/2013 06:41:50
by arin maulana (Basic support level)
Joined: 02/09/2013
Posts: 3

Dear Innokentiy Ivanov,
thank you again for your fast reply,
and thank for your help with code
Code
procedure TfrmMain.ForwardingConnectionSocksAuthMethodChoose(Sender: TObject;
  Conn: TElSSHForwardedConnection; AuthMethods: array of TElSocksAuthentication;
  var AuthMethod: TElSocksAuthentication; var Cancel: Boolean);
begin
//AuthMethod:= SBSocket.saUsercode; raise exception with same code as I mentioned above
AuthMethod:= SBSocket.saNoAuthentication; //this work for me please tell me  the difference
end;


Dear Eugene Mayevski,
thank you for your explanation about the error code

what SecureBlackbox package suits my needs above to buy?

regards

maulana
#23395
Posted: 02/11/2013 06:45:10
by Vsevolod Ievgiienko (EldoS Corp.)

Hello.

You should buy SSHBlackbox to use port forwarding.
#23396
Posted: 02/11/2013 07:52:12
by Ken Ivanov (EldoS Corp.)

Quote
//AuthMethod:= SBSocket.saUsercode; raise exception with same code as I mentioned above
AuthMethod:= SBSocket.saNoAuthentication; //this work for me please tell me the difference

By setting AuthMode to saUsercode you are telling the component to authenticate the user with basic username-password authentication. Setting AuthMode to saNoAuthentication makes the component proceed without authentication (anonymous proxy mode).

If you are not providing any usernames or passwords anywhere on the client side (e.g. in the browser), the saUsercode authentication type will not work for you.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 746 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!