Results 1 to 10 of 10

Thread: Port forwarding

  1. #1
    devtty is offline Registered User
    Name: Dmitriy None
    Organization: Personal
    Project: honeypot
    Join Date
    Oct 2009
    Posts
    5

    Port forwarding

    Hello, I have the next problem:
    We have one server(hardware-hw1) and many processes with servants. And they can call each other(on localhost only). Also we have an other server(hardware-hw2). And it is my problem. May I use only one open port on hw1 to async/sync calls? *i'm going to use ssh-tunneling.* I tried to use something like this:
    PHP Code:
    ____________________________________
    Servant1 ----------|            Servant2   |
    |       | 
    Req        |prx                       |
    |  
    RegManager     |Glacier|                   |
    |        |         |      |               
    hw1  |
    ---------|---------|------|------------------------
             |         | 
    ssh  |
             | 
    Req     |______|
             |--------| 
    hw2     |
                    ------------ 
    HW2 send to RegManager Request to get Servant1's Proxy. RegManager resend request to Servant1 and it through Glacier send own Proxy to HW2(create session and call function of hw2*setProxy(ObjectPrx)*. In glacier2router i put hw2 as server. Also hw2 work's not all time. But this doesn't work. Please tell me right way to make such scheme.

    PS. sorry for my bad english
    Last edited by devtty; 10-08-2009 at 04:07 AM.

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    I'm afraid the ASCII schema is not very clear and I'm not sure I understand your application. Where do you run the Glacier2 router, on hw1 or hw2? Which process connects to Glacier2 as a client? Is it a process from hw1 or hw2?

    Cheers,
    Benoit.

  3. #3
    devtty is offline Registered User
    Name: Dmitriy None
    Organization: Personal
    Project: honeypot
    Join Date
    Oct 2009
    Posts
    5
    Now:
    I run Glacier2 on hw1.
    Processes from hw1connect as clients to Glacier2.
    On hw1 there are processes with own servants and they communicate to each other.
    Scheme:
    http://pic.ipicture.ru/uploads/091008/bBtzbZTF2a.png
    But if i right undestand, then i call functions on hw2 of proxy it doesn't go throuth glacier.server.endpoint?


    But I want to call(sync/async) hw1's processes's functions from hw2 using only one open port on hw1 and one open port on hw2.
    Last edited by devtty; 10-08-2009 at 11:20 AM.

  4. #4
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Without more information about your application it's difficult to give advices but if you want to limit the number of connections between hw1 and hw2, it seems to me that it would be easier if this process on hw2 was the Glacier2 client. This way, all requests from the different hw1 processes will go through Glacier2 through the unique connection established between the hw2 process and Glacier2.

    Cheers,
    Benoit.

  5. #5
    devtty is offline Registered User
    Name: Dmitriy None
    Organization: Personal
    Project: honeypot
    Join Date
    Oct 2009
    Posts
    5
    Quote Originally Posted by benoit View Post
    This way, all requests from the different hw1 processes will go through Glacier2 through the unique connection established between the hw2 process and
    But, if i want to use async calls, i need have 1 open port for each process on hw1? And I should run for each process one glacier?

    PS. I updated my last message.
    Last edited by devtty; 10-08-2009 at 11:15 AM.

  6. #6
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    From the Ice protocol point of view sync/async calls are identical, and have no effect on the required number of ports.

  7. #7
    devtty is offline Registered User
    Name: Dmitriy None
    Organization: Personal
    Project: honeypot
    Join Date
    Oct 2009
    Posts
    5
    Ok, But I don't understand. What should i do to solve problem? Can I can put all traffic between hw1 and hw2 in one tunnel(e.g 10000 port on hw1 and 22 on hw2)?
    Last edited by devtty; 10-08-2009 at 11:55 AM.

  8. #8
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Yes, you can use Glacier2 to do that. In doing that the client will talk to the backend servers through Glacier2, and any data flowing back to the client from the servers behind Glacier2 will go back over the same connection that was established from the client to Glacier2.

  9. #9
    devtty is offline Registered User
    Name: Dmitriy None
    Organization: Personal
    Project: honeypot
    Join Date
    Oct 2009
    Posts
    5
    But. I send proxy from client to server. And than I use this proxy on server-side, it doesn't work over glacier2 and connect make RPC direct(not use glacier2,netstat tell me about it)?

    config.glacier2:
    Glacier2.InstanceName=TestGlacier2
    Glacier2.Client.Endpoints=ssl -p 10005 -h 127.0.0.1
    Glacier2.Server.Endpoints=tcp -h 192.168.0.187
    Glacier2.SessionManager=PNASessionManager:tcp -h 192.168.0.189 -p 10003
    Glacier2.PermissionsVerifier=verifier:tcp -h 192.168.0.189 -p 10003
    Glacier2.SessionTimeout=30
    .....

    config.client:
    Ice.Default.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
    FTPService.Client.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
    LocalService.Endpoints=tcp -h 127.0.0.1 -p 10000


    config.server:
    PNAServer.Endpoints=tcp -h 192.168.0.189 -p 10003

    What is the right way to do tunnel?
    Last edited by devtty; 10-12-2009 at 08:17 AM.

  10. #10
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Quote Originally Posted by devtty View Post
    But. I send proxy from client to server. And than I use this proxy on server-side, it doesn't work over glacier2 and connect make RPC direct(not use glacier2,netstat tell me about it)?

    config.client:
    Ice.Default.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
    FTPService.Client.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
    LocalService.Endpoints=tcp -h 127.0.0.1 -p 10000
    You should use createObjectAdapterWithRouter on the client side, and you should not set any endpoints for the object adapter. See demo/Glacier2/callback for an example of how to do this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. C Port
    By slide_o_mix in forum Help Center
    Replies: 1
    Last Post: 01-27-2008, 08:12 PM
  2. Replies: 2
    Last Post: 07-18-2006, 09:26 AM
  3. Glacier2 forwarding policy problems
    By Nis Baggesen in forum Help Center
    Replies: 3
    Last Post: 03-23-2006, 07:05 AM
  4. Question of forwarding ObjectPrx in Servant Locator
    By kongchoy in forum Help Center
    Replies: 6
    Last Post: 02-17-2006, 07:26 PM
  5. Help on Glacier2 and port forwarding!!!
    By soloman817 in forum Help Center
    Replies: 3
    Last Post: 03-31-2005, 10:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •