I am configuring my system (OSX) as a perforce server for sharing my project work with my coding partner. I want to host my server on the internet so that he will able to connect to my system. I am able to configure through this guide.Working like charm on my local host.
Maybe i am not getting something.
Please guide me to find an address or what procedure I have to do extra for making my system available to my partner .
I am very bad in UNIX terminal command
i tried these links but no answer worked for me .
Perforce with dynamic ip
Online Perforce Repositories
Some questions
Is there any need for static IP .
How i make my system available to partner over internet?
This is my p4 info.
User name: aadi
Client name: aadi-MacBook-Air
Client host: aadi-MacBook-Air.local
Client unknown.
Current directory: /Users/aadi
Client address: 127.0.0.1:50596
Server address: localhost:1666
Server root: .
Server date: 2014/11/18 01:58:14 +0530 IST
Server uptime: 00:00:10
Server version: P4D/DARWIN90U/2011.1/747877 (2013/11/21)
Server license: none
Case Handling: insensitive
I don't believe you need a static IP, so long as your partner can connect to you using your dynamic IP.
Your server has to listen on an IP address which is accessible by your partner, so "localhost:1666" will not work, because 'localhost' means to only accept connections from your own machine.
If your machine, was, say 192.168.1.101, then you'd like to see something like:
Server address: 192.168.1.101:1666
Which you should be able to accomplish by starting your server as 'p4d -p 192.168.1.101:1666'.
You can also try starting your server at 'p4d -p 1666' and see if it will listen on an address that is accessible by your partner's machine. It should, but occasionally there are problems if the IP address is not explicitly specified. If you explicitly specify your machine's IP address, and it is a dynamic IP, then you will have to stop and restart your server on the correct IP address each time your machine's IP address changes, which is rather an annoyance (and is avoided if you can in fact deploy a static IP).
All this business about static vs dynamic IP addresses should go away if your dynamic IP assignment mechanism is well-integrated with your organization's DNS infrastructure, so that your partner can use the hostname of your computer rather than the IP address.
Lastly, don't forget to check your OS X firewall: http://support.apple.com/en-us/HT201642
Related
So I am kind of new to networking and I'm just interested in the client/server architecture. Let's say you developed a program and the client version ran on a computer and the server version on the server(obviously). In order for the client to connect to the server, it would have to know the ip address of the server (and the port attached so it can be routed to the correct computer/program). Does that mean that the server's ip address can not change? Would you have to specifically tell your ISP to keep the ip address static? Because if both the client and server ip addresses change, then they would have no way to connect and the program wouldn't work... in other words there has to be one constant. When you sign up for a VPS do they give you a static ip address you can bind to from the client version? Thanks!
In order for the client to connect to the server, it would have to know the ip address of the server (and the port attached so it can be routed to the correct computer/program).
Correct.
Does that mean that the server's ip address can not change?
No. In fact, IPs can change at any time. Most servers that are exposed to the public Internet have a static domain name registered in the Internet's DNS system. A client asks DNS to resolve the desired domain name to its current IP address, and then the client can connect to it. But even in private LANs, most routers act as a local DNS server, allowing machines on the same network to discover each other's IP by machine name.
The OS typically handles DNS for you. A client can simply call gethostbyname() or prefferably getaddrinfo(), and the OS will perform DNS queries as needed on the client's behalf and return back the reported IP(s).
Would you have to specifically tell your ISP to keep the ip address static?
You can, but that usually costs extra. And it is not necessary if your server is registered in DNS. And there are free/cheap DNS systems that work with servers that do not have a static IP.
Because if both the client and server ip addresses change, then they would have no way to connect and the program wouldn't work...
That is where DNS comes into play.
in other words there has to be one constant.
A registered domain name that can be resolved by DNS.
When you sign up for a VPS do they give you a static ip address you can bind to from the client version?
It depends on the VPS service, but a more likely scenario would be you are assigned a static sub-domain within the VPS service's main domain. For example, myserver.thevps.com. Or, if you buy your own domain (which can be done very cheaply from any number of providers), you can usually link it to the DNS server operated by your VPS service.
This might be an easy question, but I am not familiar with these stuff.
Basically I have a server pc that I connect through my pc, and there is this webpage http://localhost:8080/. I can only access this address when I log in my server pc. Now I wanted to know how I can access this webpage in my pc (without having to remotely connect to my server pc). Any help will be appreciated.
you can access to your website (if your web server accept external requests) by type this code to your browser address bar from your pc:
<server ip>:8080
replace
<server ip>
with your server ip like this:
192.168.1.10:8080
Okay, so quick networking 101, localhost is a hostname that maps to the IP address of of 127.0.0.1 and these point to the local machine, i.e. your server.
In order to access that page within the same network, you'll need an external IP address. So say you're in the network of 192.168.1.0/24 and the server is on IP address 192.168.1.100. So in order to access your stuff from another machine, simply replace localhost with that IP and it should work. If not, you've got firewall issues, and those are another topic.
I have been trying to learn socket programming in C++ and got some progress for the basics. But I understood that basics are not fundamentals.
One of those fundamentals is about the question which is stated in the title. Lets say I have two separate applications running on the same computer. One of them has a server socket and the other one has a client.
When the server gets an IP address automatically, how can client find the server? Do I have to assign an IP address that is known by the client? In that case, maybe that IP address is not available on the network.
Or can client find and connect to the server by sone kind of name or id?
Have the server bind to all interfaces and have the client lookup 'localhost' by name; it's resolved locally, (ie. no external DNS service required), to an IP address stored in a 'hosts' file, and is set by default to 127.0.0.1
Google 'hosts file'
The IP address of any server in the same host is 127.0.0.1 unless the server has bound to a specific, different IP address. As #MartinJames points out, you can use 'localhost' as the hostname for that, except on certain broken Linux distributions.
I have a Laptop, with msSql sever 2005, and it is connected to my Wifi router which gets the internet. So My laptop get connected to internet. But I need to access my msSql Sever from internet to connect my webpage which I made using ASP.Net.
Please Help me... And please give a solution for this...
You'll need your IP adress to connect, then open the SQL-Port in your router. (default is 3306)
When you connect to the server just use your current ip adress.
Maybe you want a static ip or something like http://dyndns.org
you want to write web service and host that service in sql machine
First setup a static IP address on your laptop and after that you need to set up port forwarding in your router. This process differs slightly depending on your routers manufacturer and model.
After this is set up properly make sure that SQL Servers port is open on your laptops firewall.
By using Dynamic DNS you can point to your possibly changing IP address with static name so you don't have to change this constantly in your connection string.
I have a web server running out of my home. I have assigned it an address such as 192.168.1.123 on port 80.
I understand that this is running on my local network. If I go to another computer on my network and type in the server's ip address, I can see the server.
Is there a way to access this server from outside my LAN?
Yes, you need to set your router to forward connections to port 80 to your internal IP address (192.168.1.123). Look for Port Forwarding on your router admin screen which I would imagine you access by going to http://192.168.1.1
Keep in mind that your ISP may block port 80 completely in which case you can run your web server on a different port (for example por 8180) and have your router forward connections to port 8180 to your internal IP.
To access your server from outside, you just need to point your browser to your external IP address which you can find out by going to http://www.ipchicken.com
Assuming you have a connection to the internet:
https://github.com/progrium/localtunnel
is a quick way to access your local server from the internet. There might be similar implementations in other languages/platforms. This is just the one I know about.
Remember that security issues need to be carefully considered when opening your local network to the world.
If you use a PHP Webserver you can set it this way:
php -S <YourIPAdresse>:<SomePortNumber> <StartPHPpage>
Example: „php -S 192.168.1.123:9000 index.php"