Volume 2 Modifying Server For External Access: Difference between revisions

From OuroDev
Red Nile (talk | contribs)
Created page with "== Prerequisites == * Make sure you complete all of the steps in Volume 2 Getting Started first. * If you have a networking setup with a modem connec..."
 
Red Nile (talk | contribs)
Line 32: Line 32:
== Connecting a client to the server ==
== Connecting a client to the server ==


Launch the client with:
Launch the client with the following parameters:
  Ouroboros -auth 1.2.3.4
  Ouroboros -auth 1.2.3.4 -console -fullscreen 0


Where you replace 1.2.3.4 with the Public IP address that was set in cohauth.dbo.server above.
Where you replace 1.2.3.4 with the Public IP address that was set in cohauth.dbo.server above.
Watch the console for messages about if your connections to the server succeed or not, particularly when you click on Login, and when you click on your server in the server list.  Those are the common points of failure.

Revision as of 19:24, 19 June 2019

Prerequisites

  • Make sure you complete all of the steps in Volume 2 Getting Started first.
  • If you have a networking setup with a modem connected to a router, your modem needs to be in bridged mode.
  • Your router needs to support the Network Address Translation (NAT) loopback feature, with that feature turned on in order for you to be able to connect to your server from within your own Local Access Network (LAN). Without that feature, the CoH server will only allow connections from outside your LAN. NAT loopback is also known as NAT hairpinning or NAT reflection.

IP addresses

There are 3 IP addresses you need to know.

  • Localhost, or 127.0.0.1: this is the generic IP address that works on any computer, which is only used for a computer to connect to itself. Most of the IP addresses in the .cfg files are set to this.
  • Local IP address, in the form of 192.x.x.x (replace the x's with numbers). This is the IP address that other computers on a LAN can connect to. Cannot be connected to by any computers from outside the LAN. You can find this by opening a command prompt and typing "ipconfig". It will show up as your IPv4 address.
  • Public IP address. This is the IP address that other computers from outside your LAN can connect to. Usually there is a single public IP address for your router. Other people will connect to this public IP address, and then the traffic on ports will either be forwarded along to specific computers within your LAN , or blocked by the router. The easiest way to find your Public IP address is to google for "What's my IP", the search results will find sites that show you what it is.

Port forwarding

Set up port forwarding on your router, so that traffic arriving at your public IP address and meant for your CoH server is allowed through the router and sent to your server. This is done by connecting to the Admin page for your router in a web browser (usually 192.168.1.1, may differ slightly depending on the brand of router), and setting up port forwarding rules (often under the WAN section).

Set up 2 port forwarding rules, with the external ports as below and the Local IP Address as that of your CoH server (192.x.x.x, replace the x's with your address).

  • External Port 2106, Protocol: TCP
  • External Ports 7000 through 7200 (usually set as 7000:7200 in the settings), Protocol: UDP

Set public IP for the authserver

The public IP address for your server, needs to be set in the cohauth database.

In SQL Server Manager Studio(SSMS):

  1. Select File->New->Query with Current Connection
  2. Paste the following code into the window, and change "1.2.3.4" into the Public IP for your server.
    UPDATE cohauth.dbo.server SET ip=1.2.3.4 WHERE ID=1;
    
  3. Click on Execute. You should get a message "(1 row affected)" if it succeeded.
  4. Verify that your settings are correct. In the Object Explorer in SMSS, expand SQLEXPRESS>Databases>cohauth>Tables. Right-click on dbo.server, and select "Select Top 1000 Rows". This should show you the entry for your server, with id=1, name=ShardName (Paragon by default), ip=1.2.3.4 (should be your Public IP here).

Connecting a client to the server

Launch the client with the following parameters:

Ouroboros -auth 1.2.3.4 -console -fullscreen 0

Where you replace 1.2.3.4 with the Public IP address that was set in cohauth.dbo.server above.

Watch the console for messages about if your connections to the server succeed or not, particularly when you click on Login, and when you click on your server in the server list. Those are the common points of failure.