Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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
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

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).
Share this answer
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)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900