Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008227opensim[GRID] Hypergridpublic2017-08-08 07:572019-02-25 07:31
Assigned ToBillBlight 
StatusresolvedResolutionno change required 
PlatformUbuntu 17 Server + Windows 10OSAllOS VersionAll
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008227: SYSTEMIP does not work correctly
Description### SYSTEMIP does not work correctly

SYSTEMIP = 192.168.1.x is not an external IP

ExternalHostName = SYSTEMIP // Does not work correctly

SYSTEMIP = ${Const|BaseHostname} // Does not work
Steps To ReproduceUbuntu 17 Server + Windows 10 HomePC -> Network -> Internet Router

##Linux bash extern real IP Test working:
EXTSYSTEMIP=$(curl -s [^] | sed 's/[a-zA-Z<>/ :]//g')

Correct IP
Additional Information## C# Test(I'm not a C# programmer):
# The configuration of the service must be adjustable in Opensim.ini.
# service testing
# "" [^]
# "" [^]
# "" [^]

# Examples untested:

using System.Net;
using System.IO;

public IPAddress EXTSYSTEMIP()
    WebRequest hwr = HttpWebRequest.Create(new Uri("" [^]));
    WebResponse wr = hwr.GetResponse();
    Stream stream = wr.GetResponseStream();
    StreamReader streamReader = new StreamReader(stream, Encoding.UTF8);
    string htmlResult = streamReader.ReadToEnd();
    string[] htmlSplit = htmlResult.Split(new string[]{":", "<"}, StringSplitOptions.RemoveEmptyEntries);
    string IP = htmlSplit[6].Trim();
    return IPAddress.Parse(IP);

## or

using System.IO;
using System.Net;

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("" [^]);
            HttpWebResponse res = (HttpWebResponse)req.GetResponse();
            StreamReader str = new StreamReader(res.GetResponseStream());
            string ip = str.ReadToEnd();
            return IPAddress.Parse(ip);

## or

using System;
using System.Net;
using System.IO;
using System.Text.RegularExpressions;

static string[] EXTSYSTEMIP()
        WebRequest req = WebRequest.Create("" [^]);
        WebResponse res = req.GetResponse();
        Stream s = res.GetResponseStream();
        StreamReader sr = new StreamReader(s);
        string streamTxt = sr.ReadToEnd();
        Regex rx = new Regex(@"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\b");
        MatchCollection mc = rx.Matches(streamTxt);
        string[] retStr = new string[mc.Count];
        for(int i = 0; i < mc.Count; i++)
                retStr[i] = mc[i].Value.ToString();
        return retStr;
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Script Engine
Mono Version4.0
Attached Files

- Relationships
related to 0006043new Smart network detection 

-  Notes
UbitUmarov (administrator)
2017-08-08 08:00

SYSTEMIP is as name says it is the system IP, ie the IP seen by OS on its internet stack, not external IP
Manni (reporter)
2017-08-09 03:28

ExternalHostName = SYSTEMIP (SYSTEMIP is as name says it is the system IP, not external IP)
ExternalHostName = external IP or external Name

Newspaper 2015: USA are the IP addresses.
This has already been the case in Europe for some time.
We have to go with time and work with changing IP.
We need something like EXTSYSTEMIP (EXTERNALIP as one might call it.).
This can not be difficult for a programmer to insert such an important thing.

Each grid can host this service itself:
<title><?php echo "My public IP Address"; ?></title>
<?php echo $_SERVER['REMOTE_ADDR']; ?>
UbitUmarov (administrator)
2017-08-09 18:52

if you mean adding a option for a region to discover the external IP, like using a web page as above, that could be a option yes.
Manni (reporter)
2017-08-10 05:31

Yes that would be nice.

For this purpose, an adjustment possibility for a time control, and the IP service would have to be made.


We need to do everything we can to make the OpenSimulator as easy as possible.
It does not work to write programs that nobody can start without programming knowledge.

It is important that this is also included in Gettext [^]

There should be a function load mesh filename.format for the console.
This could be achieved with the ASSIMP library [^]
ASSIMP library can import, export and convert meshfiles.
BillBlight (developer)
2017-08-10 09:53
edited on: 2017-08-10 09:55

The problem with this is it would cause you to depend on an external service, if that service is down it would fail.

You cannot make this request from a LOCAL service to a LOCAL service because if both are inside the firewall it will return your inside ip. So Opensimulator cannot provide this service locally.

If it is that big of a problem , buy your own web domain , and host the file your self , here is an example ..

SYSTEMIP=`curl [^]`

and for windows you can download the curl.exe and use

for /f %%i in ('curl -s ""' [^]) do set SYSTEMIP=%%i

But again both these options require you to access an EXTERNAL service, they cannot do it locally .. If done locally it is simply going to return the local ip of your system.

I use both these for various things ..

And I disagree that we need to make it "easiest as possible", opensimulator is a very complicated piece of code, and people really should learn a few things before diving off the deep end.

If you want easy , you can use ferds outworldz installer ..

BillBlight (developer)
2017-08-10 11:09

I provide the following batch file for windows users that want this function, I also provide them with the windows version of curl, [^]

@echo off

@setlocal EnableDelayedExpansion
set ip_address_string="IPv4 Address"

@for /f %%i in ('curl -s ""' [^]) do set SYSTEMIP=%%i
@echo Your External IP is %SYSTEMIP%
@echo You will need this when configuring your region.
@echo You will have to configure your router
@echo to allow the ports through to your PC's
@echo Internal Address.
@echo Typically this region will be configured
@echo on Port 9100
for /f "usebackq tokens=2 delims=:" %%f in (`ipconfig ^| findstr /c:%ip_address_string%`) do echo Your IP Internal Address is: %%f
@echo Visit [^]
@echo for information on forwarding ports.
cd bin
BillBlight (developer)
2017-08-10 11:23

in linux just add this to your startup script

SYSTEMIP=`curl [^]`
kcozens (administrator)
2017-08-10 13:14

This report could be closed as "not a bug". SYSTEMIP is doing what it is meant to do. The use of it is incorrect in the examples.

If you are running Open Sim on a local LAN and need it to be accessible from the outside world you can use some of the suggestions given in the comments.
Manni (reporter)
2017-08-11 05:45

@ Watcher64 @ kconzens
You do not have to explain this to me.
I've written articles and howto's about it.
Also I have written the program MysysIP.exe for Windows.
If I may, I will gladly send all the people to them.
They seem to have fun always answer the same questions.

It would be great if they would insert external IP.
Many people would be grateful to them.
I have now an Ip service on started. [^]
BillBlight (developer)
2017-08-11 11:32

I guess you did not understand, SYSTEMIP was never meant to be your EXTERNAL IP .. So it is doing what it is supposed to do, so it is not a bug.

What you suggest is more of a feature request than a bug, since the current behavior is as expected.

And the explanation was for OTHERS that may read this mantis, not everyone else knows everything.

Having Opensimulator rely on an external service like to get an external IP is/would create even more of a support nightmare ..
Manni (reporter)
2017-08-11 12:16

I can not speak much English, so a problem with them.

The people do not understand the SYSTEMIP is not the external IP is because in the Regions.ini stands
ExternalHostName = SYSTEMIP so they think there is external then it must also be an external IP.
We know it is not so, but not others.

This service is disabled in the configuration and does not require any support on your part.

Example: OpenSim.ini:
    ;; ExternalService (true / false) false
    ;; ServiceAddress from an ExternalServices or GridService
    ;; Timer interval in minutes.
    ; ExternaService = true
    ; ServiceAdress "" [^]
    ;ServiceAdressTimer = 60

I have a lot of support without such features.

Just this bad initialTerrain = "pinhead-island" I have Daily work to say how it goes flat.
smxy (reporter)
2017-08-11 14:29

If you want to flatten it, try this at the console:

terrain fill 21
tampa (reporter)
2019-02-11 07:56

It would probably be best to find an external service that is bound to be available regardless, ideally a dns provider or a service run by a large corporation/non-profit.

If there is still a desire to implement this please provide a patch otherwise this issue can be filed under "intended behavior" as SYSTEMIP is working as intended.
paela argus (reporter)
2019-02-16 09:25

well I do not agree with Manni,
In my case my servers use multiple IP Alias and I have to register them in InternalIP and ExternalIP the domain.
If change kill my system like many other people
paela argus (reporter)
2019-02-16 09:26

initialTerrain = "flat"
BillBlight (developer)
2019-02-16 09:33

You realize that even the wiki says don't use SYSTEMIP if you plan on having access from the internet ..

and I quote ..

"If you leave ExternalHostName at the default 'SYSTEMIP' then this will become the LAN network address of the machine (e.g. This is fine if you are connecting only from within your LAN. If you want to connect to it from a client on the internet, this should be the External IP Address of your router. Fully Qualified Domain Names (FQDNs) can also be used though they will be converted to a numeric IP address before being sent to the viewer."
BillBlight (developer)
2019-02-16 16:33

This is working as intended, per the wiki;

"If you leave ExternalHostName at the default 'SYSTEMIP' then this will become the LAN network address of the machine (e.g. This is fine if you are connecting only from within your LAN. If you want to connect to it from a client on the internet, this should be the External IP Address of your router. Fully Qualified Domain Names (FQDNs) can also be used though they will be converted to a numeric IP address before being sent to the viewer."

- Issue History
Date Modified Username Field Change
2017-08-08 07:57 Manni New Issue
2017-08-08 08:00 UbitUmarov Note Added: 0032235
2017-08-09 03:28 Manni Note Added: 0032236
2017-08-09 18:52 UbitUmarov Note Added: 0032237
2017-08-10 05:31 Manni Note Added: 0032238
2017-08-10 09:53 BillBlight Note Added: 0032239
2017-08-10 09:55 BillBlight Note Edited: 0032239 View Revisions
2017-08-10 11:09 BillBlight Note Added: 0032240
2017-08-10 11:23 BillBlight Note Added: 0032241
2017-08-10 13:14 kcozens Note Added: 0032242
2017-08-11 05:45 Manni Note Added: 0032243
2017-08-11 11:32 BillBlight Note Added: 0032244
2017-08-11 12:16 Manni Note Added: 0032245
2017-08-11 14:29 smxy Note Added: 0032246
2019-02-11 07:56 tampa Note Added: 0034725
2019-02-16 09:25 paela argus Note Added: 0034780
2019-02-16 09:26 paela argus Note Added: 0034781
2019-02-16 09:33 BillBlight Note Added: 0034782
2019-02-16 16:33 BillBlight Note Added: 0034786
2019-02-16 16:33 BillBlight Status new => resolved
2019-02-16 16:33 BillBlight Resolution open => no change required
2019-02-16 16:33 BillBlight Assigned To => BillBlight
2019-02-25 07:31 tampa Relationship added related to 0006043

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker