Problem in Networking...

Discussion in 'Java' started by sravan_reddy001, Jan 20, 2008.

  1. I have the Server and Client programs...

    those work well on my system...
    the problem is when i run the server and client on two different
    system that are not in LAN and connected to INTERNET its not
    working...

    how can i resolve IP sharing (192.168.1.10 shown by IPCONFIG) and
    (122.169.150.97) by
    http://whatismyipaddress.com/

    how can resolve that problem..

    thanks...
    sravan_reddy001, Jan 20, 2008
    #1
    1. Advertising

  2. sravan_reddy001

    Christian Guest

    sravan_reddy001 schrieb:
    > I have the Server and Client programs...
    >
    > those work well on my system...
    > the problem is when i run the server and client on two different
    > system that are not in LAN and connected to INTERNET its not
    > working...
    >
    > how can i resolve IP sharing (192.168.1.10 shown by IPCONFIG) and
    > (122.169.150.97) by
    > http://whatismyipaddress.com/
    >
    > how can resolve that problem..
    >
    > thanks...


    In this case you need to connect to the WAN IP of the Server (the one
    shown by whatsmyip.com). Also if a NAT is present you will have to
    forward the port you are using to the the LAN IP of the server.

    Christian
    Christian, Jan 20, 2008
    #2
    1. Advertising

  3. "sravan_reddy001" <> wrote in message
    news:...
    >I have the Server and Client programs...
    >
    > those work well on my system...
    > the problem is when i run the server and client on two different
    > system that are not in LAN and connected to INTERNET its not
    > working...
    >
    > how can i resolve IP sharing (192.168.1.10 shown by IPCONFIG) and
    > (122.169.150.97) by
    > http://whatismyipaddress.com/
    >
    > how can resolve that problem..


    In order for the client to connect to the server, the server must have an
    internet-visible IP number. Your situation isn't clear to me, but I would
    guess that you are running a server on a machine whose local IP is
    192.168.X.X This class of address is not used on the Internet directly but
    is used on LANs. That is, there are thousands of machines with IP address
    192.168.1.10. Like them, your LAN is behind a NAT (Network Address
    Translation) router that has a true internet address (122.169.150.97). The
    NAT router is probably built into your cable or DSL modem and it translates
    the outgoing packets to appear to come from the router and the incoming
    packets to direct them to the appropriate machine.

    The primary issue with this configuration is that your server itself has no
    internet-visible IP. A client looking for 192.168.* will not find it and
    any client looking for 122.* will find only your router, not your local
    machine (which generally is a good thing.) The solution is to configure
    your router so that it forwards a particular port from itself to some
    machine inside your lan. For example, if your server runs on port 7000,
    have your router open up 7000 and forward it to 192.168.1.10.

    Keep in mind that as soon as you make a service available on the Internet it
    can be subject to external connection requests by the thousands--be sure
    your network is secure. Opening up many ports is simply asking for trouble.
    Also, making your server accessible to the internet may violate your service
    contract with your ISP, especially if the traffic is very high. Some ISPs
    block will block you from common ports like 80.

    If you are also trying to get the server to contact the client, the process
    is very similar but I would strongly suggest you rethink your protocol as
    doing so is rarely ever needed and places heavy burdens on the client.

    Matthew Humphrey http://www.iviz.com/
    Matt Humphrey, Jan 20, 2008
    #3
  4. The above information is very good, thanks for the suggestion..
    i have learnt many things from the above reply...

    but, i have one more problem..
    i have not allowed any port for ipforwarding().. then how can certain
    clients like Yahoo messenger, google talk etc so the same thing as my
    program...

    will those clients use the http port or some port that is given
    access...

    thanks a lot...
    sravan_reddy001, Jan 21, 2008
    #4
  5. sravan_reddy001

    Lew Guest

    sravan_reddy001 wrote:
    > i [sic] have not allowed any port for ipforwarding().. then how can certain
    > clients like Yahoo messenger, google talk etc so the same thing as my
    > program...
    >
    > will those clients use the http port or some port that is given
    > access...


    Firewalls generally allow outgoing programs to set up connections; it's the
    incoming ones that need port-forwarding.

    --
    Lew
    Lew, Jan 21, 2008
    #5
  6. > Firewalls generally allow outgoing programs to set up connections; it's the
    > incoming ones that need port-forwarding.
    >
    > --
    > Lew


    Do you mean that if i run my server program on a SERVER then i can run
    the program successfully...
    sravan_reddy001, Jan 21, 2008
    #6
  7. Lew wrote:
    > sravan_reddy001 wrote:
    >> i [sic] have not allowed any port for ipforwarding().. then how can
    >> certain
    >> clients like Yahoo messenger, google talk etc so the same thing as my
    >> program...
    >>
    >> will those clients use the http port or some port that is given
    >> access...

    >
    > Firewalls generally allow outgoing programs to set up connections; it's
    > the incoming ones that need port-forwarding.


    Personal firewalls.

    Corporate firewalls often only allow outbound from the MIS departments
    servers including a proxy server through a few ports. Users browsers has
    to go out through the proxy server.

    It is not obvious to me whether the original poster is trying
    from work or from home.

    Arne
    Arne Vajhøj, Jan 21, 2008
    #7
  8. sravan_reddy001

    Lew Guest

    Arne Vajhøj wrote:
    > Lew wrote:
    >> sravan_reddy001 wrote:
    >>> i [sic] have not allowed any port for ipforwarding().. then how can
    >>> certain
    >>> clients like Yahoo messenger, google talk etc so the same thing as my
    >>> program...
    >>>
    >>> will those clients use the http port or some port that is given
    >>> access...

    >>
    >> Firewalls generally allow outgoing programs to set up connections;
    >> it's the incoming ones that need port-forwarding.

    >
    > Personal firewalls.
    >
    > Corporate firewalls often only allow outbound from the MIS departments
    > servers including a proxy server through a few ports. Users browsers has
    > to go out through the proxy server.
    >
    > It is not obvious to me whether the original poster is trying
    > from work or from home.


    Based on their report that IM products work, it seems that their firewall is
    allowing outbound programs to make connections.

    --
    Lew
    Lew, Jan 21, 2008
    #8
  9. sravan_reddy001

    Lew Guest

    Lew said:
    >> Firewalls generally allow outgoing programs to set up connections; it's the
    >> incoming ones that need port-forwarding.


    sravan_reddy001 wrote:
    > Do you mean that if i [sic] run my server program on a SERVER then i can run
    > the program successfully...


    No.

    I mean that when a program makes an outbound connection, many firewalls permit
    that outbound (i.e., client) program to establish a two-way connection.

    I don't even really understand your question, assuming it was a question. I
    made no comments about "server program", nor about a "SERVER", whatever you
    mean by that.

    --
    Lew
    It helps clarity to attribute quotes.
    The word "I" in English is always capitalized.
    Lew, Jan 21, 2008
    #9
  10. i(sravan_reddy001) am the original poster..

    i'm trying the program at my home...
    i am trying to use the program with another frined who is also
    connected to internet...
    the error it is generating is "Connection Timed Out"..
    sravan_reddy001, Jan 21, 2008
    #10
  11. sravan_reddy001

    Roedy Green Guest

    On Sun, 20 Jan 2008 07:50:06 -0800 (PST), sravan_reddy001
    <> wrote, quoted or indirectly quoted someone
    who said :

    >those work well on my system...
    >the problem is when i run the server and client on two different
    >system that are not in LAN and connected to INTERNET its not
    >working...
    >
    >how can i resolve IP sharing (192.168.1.10 shown by IPCONFIG) and
    >(122.169.150.97) by
    >http://whatismyipaddress.com/


    Very rarely do you hard code IP addresses into programs. Most places
    you can use an IP you can use a website name.

    To talk between sites, your firewalls on both sides must co-operate to
    let the traffic through. Even a little router these days has a small
    firewall in it.

    For general info on IPs see http://mindprod.com/jgloss/ip.html
    --
    Roedy Green, Canadian Mind Products
    The Java Glossary, http://mindprod.com
    Roedy Green, Jan 21, 2008
    #11
  12. sravan_reddy001

    Roedy Green Guest

    On Sun, 20 Jan 2008 18:31:32 -0800 (PST), sravan_reddy001
    <> wrote, quoted or indirectly quoted someone
    who said :

    >Do you mean that if i run my server program on a SERVER then i can run
    >the program successfully...


    Firewalls by default don't advertise a port waiting for an incoming
    connection. You must do something special to configure the firewall to
    make that port visible to the outside world, often translating the
    port number. The internal IP address is not advertised to the outside
    world. They just see the IP of the firewall.
    --
    Roedy Green, Canadian Mind Products
    The Java Glossary, http://mindprod.com
    Roedy Green, Jan 21, 2008
    #12
  13. sravan_reddy001 wrote:
    > i(sravan_reddy001) am the original poster..
    >
    > i'm trying the program at my home...
    > i am trying to use the program with another frined who is also
    > connected to internet...
    > the error it is generating is "Connection Timed Out"..
    >

    Lets call the one that is running the Server A and the one running the
    Client, B.

    A must do this:
    - note the port the server program listens on (call it portS)
    - make his router forward portS to the computer that is running
    the server program
    - tell B his router's IP (we'll call this IPA) and portS.

    B should make the Client program connect to IPA:portS


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Jan 21, 2008
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Grazzini

    Re: Networking with Perl

    Steve Grazzini, Jul 30, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,061
    Steve Grazzini
    Jul 30, 2003
  2. mirek
    Replies:
    3
    Views:
    515
    Chris Jackson
    Dec 17, 2003
  3. JONESEY

    Networking problem

    JONESEY, Nov 30, 2003, in forum: Java
    Replies:
    6
    Views:
    316
    JONESEY
    Nov 30, 2003
  4. nialltimpson

    networking problem

    nialltimpson, Mar 23, 2005, in forum: Java
    Replies:
    8
    Views:
    359
    nialltimpson
    Mar 24, 2005
  5. Replies:
    1
    Views:
    262
Loading...

Share This Page