Home Help Center

Port forwarding

devttydevtty Member Dmitriy NoneOrganization: PersonalProject: honeypot
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]
____________________________________
| Servant1
| Servant2 |
| | Req |prx |
| RegManager |Glacier| |
| | | | hw1 |
|
|
|
| | ssh |
| Req |______|
|
| hw2 |
[/PHP]

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

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • devttydevtty Member Dmitriy NoneOrganization: PersonalProject: honeypot
    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.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • devttydevtty Member Dmitriy NoneOrganization: PersonalProject: honeypot
    benoit wrote: »
    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.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    From the Ice protocol point of view sync/async calls are identical, and have no effect on the required number of ports.
  • devttydevtty Member Dmitriy NoneOrganization: PersonalProject: honeypot
    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)?
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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.
  • devttydevtty Member Dmitriy NoneOrganization: PersonalProject: honeypot
    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?
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    devtty wrote: »
    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.
Sign In or Register to comment.