[Headless 0.16.51] Explicitly set external ip address

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
lay
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Oct 01, 2018 8:33 am
Contact:

[Headless 0.16.51] Explicitly set external ip address

Post by lay »

Hi,
I've got multiple public IP addresses available I'd like to use a different one from the one you are autodetecting, is this possible?
Connecting directly to the IP is working at the moment but through the public listing is not.

Thank you.

Loewchen
Global Moderator
Global Moderator
Posts: 8319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [Headless 0.16.51] Explicitly set external ip address

Post by Loewchen »

You can define what network adapter factorio is using: viewtopic.php?f=49&t=62325.

lay
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Oct 01, 2018 8:33 am
Contact:

Re: [Headless 0.16.51] Explicitly set external ip address

Post by lay »

Thank you, but I don't think that's what I need. I don't have multiple interfaces on the machine, I'm behind a NAT that can use multiple public IPs, the one that I'm using to connect to the internet (that's the one the pingpong servers are detecting) it's not the one I can port forward on. It's something like this

Code: Select all

 
 Server ---- FIREWALL --------- IP1 (Main internet connection)
                 | -----------IP2 (Here is where I would like to run my factorio server)
I've already tested my port forwards and are working fine I can connect without issues on IP2, the only problem is that IP1 is the one being advertised to the Matching server.


Cheers.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: [Headless 0.16.51] Explicitly set external ip address

Post by quyxkh »

I don't think anybody's ever written a UPnP service to allow external-interface picking like they have for port renaming. You'd have to get admin access to your router and program whatever internal controls it uses, iptables, bpf, whatever, to look for your Factorio server's internal IP and port number. UPnP allows specifying requests in a common form and writing router services to carry them out using internal control facilities, but I don't think one exists for this, UPnP is a standard interface for common requests on single-WAN leaf nodes, I'm guessing whatever beast you've got offers administrative shell access and that's where you'll need to go to configure this. Maybe there's a pfsense rule for it if it's running that.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [Headless 0.16.51] Explicitly set external ip address

Post by Zavian »

lay wrote:
Mon Oct 01, 2018 2:17 pm
Thank you, but I don't think that's what I need. I don't have multiple interfaces on the machine, I'm behind a NAT that can use multiple public IPs, the one that I'm using to connect to the internet (that's the one the pingpong servers are detecting) it's not the one I can port forward on. It's something like this
Simplest solution is to tell clients to connect directly to the external IP address of the router you have setup your port forward on via forum posts or discord etc. Next simplest is probably to change the gateway for the local machine. That should result in all the local machine's internet traffic using the router you have established a port forward on. A third option would be to use the firewall to redirect the servers traffic out the correct gateway. A more advanced option would be to give the local machine multiple IP addresses, each with different gateways, and then you should be able to bind the server to the address with the correct gateway. (Note that I've never tried to do any of the last 3 options, but I think they are all workable, assuming you don't run into firewall or permission issues).

Post Reply

Return to “Technical Help”