Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008227opensim[GRID] Hypergridpublic2017-08-08 07:572017-08-11 14:29
ReporterManni 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
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

(Regions.ini)
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 http://checkip.dyndns.org [^] | sed 's/[a-zA-Z<>/ :]//g')
echo $EXTSYSTEMIP

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
# "http://bot.whatismyipaddress.com/" [^]
# "http://checkip.dyndns.org" [^]
# "http://www.myip.is" [^]


# Examples untested:

using System.Net;
using System.IO;

public IPAddress EXTSYSTEMIP()
{
    WebRequest hwr = HttpWebRequest.Create(new Uri("http://checkip.dyndns.org" [^]));
    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();
    stream.Close();
    wr.Close();
    return IPAddress.Parse(IP);
}

## or


using System.IO;
using System.Net;

 IPAddress EXTSYSTEMIP()
        {
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://bot.whatismyipaddress.com/" [^]);
            HttpWebResponse res = (HttpWebResponse)req.GetResponse();
            StreamReader str = new StreamReader(res.GetResponseStream());
            string ip = str.ReadToEnd();
            str.Close();
            res.Close();
            return IPAddress.Parse(ip);
        }

## or


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

static string[] EXTSYSTEMIP()
{
        WebRequest req = WebRequest.Create("http://www.myip.is" [^]);
        WebResponse res = req.GetResponse();
        Stream s = res.GetResponseStream();
        StreamReader sr = new StreamReader(s);
        string streamTxt = sr.ReadToEnd();
        res.Close();
        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
EnvironmentUnknown
Mono Version4.0
Viewer
Attached Files

- Relationships

-  Notes
(0032235)
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
(0032236)
Manni (reporter)
2017-08-09 03:28

Regions.ini.example
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:
myip.php
<title><?php echo "My public IP Address"; ?></title>
<?php echo $_SERVER['REMOTE_ADDR']; ?>
(0032237)
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.
(0032238)
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.

Remarks:

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 https://en.wikipedia.org/wiki/Gettext [^]

There should be a function load mesh filename.format for the console.
This could be achieved with the ASSIMP library https://en.wikipedia.org/wiki/Open_Asset_Import_Library [^]
ASSIMP library can import, export and convert meshfiles.
(0032239)
watcher64 (reporter)
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 http://www.yourdomain.com/myip.php [^]`

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

for /f %%i in ('curl -s "http://www.yourdomain.com/myip.php"' [^]) 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 ..

(0032240)
watcher64 (reporter)
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, https://curl.haxx.se/download.html [^]

@echo off

@setlocal EnableDelayedExpansion
set ip_address_string="IPv4 Address"

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

in linux just add this to your startup script

SYSTEMIP=`curl http://bot.whatismyipaddress.com/ [^]`
(0032242)
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.
(0032243)
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.

@UbitUmarov
It would be great if they would insert external IP.
Many people would be grateful to them.
I have now an Ip service on opensimwiki.de started.
http://opensimwiki.de/myip.php [^]
(0032244)
watcher64 (reporter)
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 ..
(0032245)
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:
[ExternalIP]
    ;; ExternalService (true / false) false
    ;; ServiceAddress from an ExternalServices or GridService
    ;; Timer interval in minutes.
    ; ExternaService = true
    ; ServiceAdress "http://opensimwiki.de/myip.php" [^]
    ;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.
(0032246)
smxy (reporter)
2017-08-11 14:29

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

terrain fill 21

- 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 watcher64 Note Added: 0032239
2017-08-10 09:55 watcher64 Note Edited: 0032239 View Revisions
2017-08-10 11:09 watcher64 Note Added: 0032240
2017-08-10 11:23 watcher64 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 watcher64 Note Added: 0032244
2017-08-11 12:16 Manni Note Added: 0032245
2017-08-11 14:29 smxy Note Added: 0032246


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker