Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is my Oracle Virtual Box Version 4.2.18 r88780

Details of my host machine

Operating System : Scientific Linux 6.4

I am using static ip

root@localhost ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:1E:EC:95:18:66  
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:19 

Details of my guest machine

Operating System: CentOS 6.4

eth0      Link encap:Ethernet  HWaddr 08:00:27:6D:C3:A6  
          inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe6d:c3a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:360 (360.0 b)  TX bytes:1746 (1.7 KiB)

This is my Virtual Box Network Setting

enter image description here

This is the ping output

[root@localhost ~]# ping 192.168.1.4 
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.
From 192.168.1.6 icmp_seq=1 Destination Host Unreachable
From 192.168.1.6 icmp_seq=2 Destination Host Unreachable
From 192.168.1.6 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.1.4 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5640ms
pipe 3

I tried flushing iptables also still not working, loopback is working.

share|improve this question
    
Do you have a static IP on the guest? –  MariusMatutiae Oct 2 '13 at 13:38
    
Yes in guest also i am using static IP –  max Oct 2 '13 at 14:23
    
In the past I have had troubles configuring static IP in VBox guests with bridges. Can you try, just once, not to set the static IP, and see whether this works? This will also avoid the need for setting up a proper route inside the guest OS; you had done that, had you not? –  MariusMatutiae Oct 2 '13 at 14:42
    
i tried that also not working –  max Oct 2 '13 at 15:10
    
can you show your routing table? –  MariusMatutiae Oct 2 '13 at 15:15

2 Answers 2

In most cases the easiest setup is to use NAT and define port forwarding as needed.

For example, a simple Port Forwarding setup allowing connection to the VM from the host through shh on localhost:10022, and to the webserver on localhost:8080would be:

(Name - Protocol - Host IP : Host Port - Guest IP : Guest Port)
SSH - TCP - 127.0.0.1 : 10022 - 10.0.2.15(*) : 22
www - TCP - 127.0.0.1 : 8080 - 10.0.2.15(*) : 80

(*) virtual IP returned by a ifconfig from the VM, most probably different for you.

Should you have special requirements preventing NAT from working, please give some details about what you want to achieve.

share|improve this answer
1  
I want to create a network between host and guest, I want to practice ftp, http, and samba servers and some file transfer protocals also but i am unable to configure connection only . –  max Oct 2 '13 at 13:23

Depending upon your distro, you may have to install a package containing bridge-related utilities. That would be netctl on Arch, bridge-utils on Debian & friends, and so on. In your case, you have to issue:

yum install bridge-utils

as root, of course.

share|improve this answer
    
already installed, [root@localhost ~]# rpm -qa | grep bridge-utils bridge-utils-1.2-10.el6.x86_64 –  max Oct 2 '13 at 14:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.