justvanbloom / phpvirtualbox

Automatically exported from code.google.com/p/phpvirtualbox
0 stars 0 forks source link

NAT proxy-only #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install a Linux Dist (also Debian) as Guest with NAT
2. Install on Guest apache/php
3. try to get REMOTE_HOST Variable (i.e. with phpinfo();); or an other form of 
getting the IP of the Machine which trys to access the Server from extern

What is the expected output? What do you see instead?
I would expect to see the IP Address of the Computer I use to access the page 
which contains the output of $_Server['REMOTE_HOST'], instead I see the IP of 
the NAT Gateway interface (10.0.2.2 or something like that).

What version of phpVirtualBox, VirtualBox, and PHP are you using? On what
operating system?
phpVirtualBox 4.0.3, Virtualbox 4.0.2, PHP latest. Client is Debian lenny and 
Host is Debian squeeze

Please provide any additional information below.
This Problem is of course Guestwide, so it is a Problem for programs like 
fail2ban, or everything you use to log user access on the machines.
To fix this use can do
    VBoxManage --modifyvm <MachineName> --nataliasmode<1-n> proxyonly

In General it would be really helpfull if there was a way to set DNS 
pass-domain, use-poxy, use-host-resolver and Alias logging, proxy-onlye, 
use-same-ports Settings on a per NAT Adapter basis via phpvirtualbox.
Because the nataliasmode is new (Introduced in VBox 4.x) this really gave me 
quite some headage to find out what was wrong..

Original issue reported on code.google.com by BBSDead...@gmail.com on 25 Feb 2011 at 9:06

GoogleCodeExporter commented 9 years ago
I will add these settings to the next version of phpVirtualBox.

Original comment by imooreya...@gmail.com on 25 Feb 2011 at 3:16

GoogleCodeExporter commented 9 years ago
These have been introduced in phpVirtualBox 4.0-4. The setting 
enableAdvancedConfig must be on in order to see the additional NAT options. See 
config.php-example in phpVirtualBox's folder for more info.

Original comment by imooreya...@gmail.com on 1 Mar 2011 at 3:47