I have a Windows Server 2012, in a data center, with Virtualbox to host a linux CentOS 6.4 server.
The data center has provided me 5 IPs, and they are all on the same subnet.
Windows is accessible from outside, IIS is working properly, as well as FTP and other services.
CentOShas a LAMP configuration, and running a curl command from the console I can see the apache test page, and the login page of phpmyadmin. If I ping or curl from CentOS I correctly get responses from external website. If I ping the IP address from outside I've assigned to CentOS, I can see responses.
I have configured the gateway in /etc/sysconfig/network-scripts/ifcfg-eth0 with the following parameters:
# Intel Corporation 82540EM Gigabit Ethernet Controller DEVICE=eth0 BOOTPROTO=static ONBOOT=yes HWADDR=06:01:78:a7:00:33 NETMASK=255.255.248.0 IPADDR=95.110.xxx.xxx TYPE=Ethernet
and I've defined the default gateway here (/etc/sysconfig/network)
NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=myhostname GATEWAY=95.110.xxx.xxx
In Windows I have two network adapter visible:
- Ethernet, with specified the IPv4 of the windows server
- VirtualBox Host-only Network, where I have set one of the additional IP available
Then in the Virtualbox control panel I've tried to set both Bridged Network and host-only, but the CentOS server is never accessible from outside, and by outside I mean also from the Windows host server.
I always receive a "Site not reachable", timeout response if I try to browse the IP or http://95.110.xxx.xxx/phpmyadmin. But If I try to ping it I get responses. Which is the right way to configure virtualbox and network adapters to make the guest accessible from outside?
- I don't want to use NAT and port forwarding as I own a dedicated IP for guest server and I don't want to configure port fwd.
- I've tried to disable iptables and ip6tables, but still not accessible.
- I've tried also to temporary disable windows firewall.
- Don't tell me to use Vagrant or other software.
- The physical server is directly connected to internet, without any hard firewall or proxy that could cause issues.