Click here to Skip to main content
12,550,397 members (46,579 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ VB Windows Linux VB.NET QT , +
hi every body
i am working on a socket program...
so i wanna in 1)server side i run my program with valid ip
2)client side my other program is run maybe on a in that vps probebly my program connect to internet with local ip address(static)but either own vps has
my questions is :
1)in my client side can i listen to and send with port of valid??
2)i wanna connect with my server to my client program i should first connect to vps...and how i can access with vps ip to local ip in there??
3)every idea you have about it share
thank you
Posted 21-Nov-12 18:03pm
Updated 21-Nov-12 18:04pm
Jason Gleim 22-Nov-12 0:14am
When you say 'vps' do you mean VPN? As in a Virtual Private Network?
rpm3d 22-Nov-12 0:52am
no vps is virtual private server (VPS) but now i think maybe need to this work on vpn you have idea about vpn??

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1) Yes you can
2) You need to connect to VPS's public IP. Either you or the ISP needs to set up NAT (or port forwarding) to forward the server's packets to the client (ie. to the VPS's private IP).
rpm3d 1-Dec-12 1:31am
thank you and do you how can i set up nat or port forwarding with my program in some vps???that my point is perhaps i dont need to contact ISP OR VPS manager(as you know :)!!)
manoranjan 2-Dec-12 5:01am
This is done on the router/firewall that is protecting the VPS. Ask the guy who configured VPS's private IP. He will need to know your client's and server's listening ports.
rpm3d 3-Dec-12 1:08am
thank you again
manoranjan 3-Dec-12 1:15am
You are welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100