[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 4539 – Having problems with Port Forwarding scenarios

Last modified: 2006-01-17 19:21:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4539 - Having problems with Port Forwarding scenarios
Having problems with Port Forwarding scenarios
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
unspecified
Other Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-09 14:44 UTC by saveme
Modified: 2006-01-17 19:21 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description saveme 2006-01-09 14:44:50 UTC
I have an internal server where i host my wiki (mediawiki). We give people from 
outside our network, access this wiki (thru the internet). We had assigned a valid 
internet IP address and had done a portforwarding to the internal servers 80 port, at 
the gateway. This was not working, for users who tried to access the wiki outside our 
network, as once the connection gets port forwarded to the internal server....The 
$wgServer is set to the internal servers name, which is invisible from outside world. 
I dint find any doc which explains how to fix it. I tried a small patch, which works 
fine at least for me. Please let me know if there is any other fixes.

=== includes/DefaultSettings.php ===
/** This is the outside IP ( valid IP) */
/** comes handly when use the server as port forward for outside IPS */
$wgOutsideServer = '61.95.163.87';
/* give the inside accessing IP blocks */
$wgInsideIPblock = '192.168';
/*Hack end */

/** URL of the server. It will be automaticly build including https mode */
$wgServer = '';

if( isset( $_SERVER['SERVER_NAME'] ) ) {
    $wgServerName = $_SERVER['SERVER_NAME'];
} elseif( isset( $_SERVER['HOSTNAME'] ) ) {
    $wgServerName = $_SERVER['HOSTNAME'];
} elseif( isset( $_SERVER['HTTP_HOST'] ) ) {
    $wgServerName = $_SERVER['HTTP_HOST'];
} elseif( isset( $_SERVER['SERVER_ADDR'] ) ) {
    $wgServerName = $_SERVER['SERVER_ADDR'];
} else {
    $wgServerName = 'localhost';
}

/* Hack for IP redirect - Anil Menon */
/* if Im not comming from a internal IP, switch to my valid INTERNET IP */
$ip = (getenv(HTTP_X_FORWARDED_FOR)) ? getenv(HTTP_X_FORWARDED_FOR) : getenv
(REMOTE_ADDR);
if(! preg_match("/^$wgInsideIPblock/",$ip)) {
    $wgServerName = $wgOutsideServer;
}
Comment 1 Ævar Arnfjörð Bjarmason 2006-01-09 14:47:36 UTC
Try removing your hack and addin this to your apache configuration (I'm assuming
you use apache)

UseCanonicalName Off
Comment 2 Antoine "hashar" Musso (WMF) 2006-01-17 19:21:14 UTC
User fixed the issue (I can access its website from internet).

Note You need to log in before you can comment on or make changes to this bug.


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011