Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
Should test it one by one : 1) On centos u run ~$:ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0 up 2) Ping ubuntu server(192.168.0.10) from centos(192.168.0.20) 3) Just forget about /etc/init.d/network restart ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132

    Should test it one by one :

    1) On centos u run ~$:ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0 up

    2) Ping ubuntu server(192.168.0.10) from centos(192.168.0.20)

    3) Just forget about /etc/init.d/network restart & everything . Just make sure both server pingable each other.

  2. #12
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,794
    Quote Originally Posted by athlon_crazy View Post
    Should test it one by one :

    1) On centos u run ~$:ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0 up

    2) Ping ubuntu server(192.168.0.10) from centos(192.168.0.20)

    3) Just forget about /etc/init.d/network restart & everything . Just make sure both server pingable each other.
    # ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0 up
    No complaint

    # ping -c3 192.168.0.10
    Code:
    PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
    
    --- 192.168.0.10 ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2002ms
    # ifconfig
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0C:29:1D:65:AD  
              inet addr:172.16.103.128  Bcast:172.16.103.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe1d:65ad/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:928 errors:0 dropped:0 overruns:0 frame:0
              TX packets:631 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:241183 (235.5 KiB)  TX bytes:78992 (77.1 KiB)
              Base address:0x1070 Memory:ec820000-ec840000 
    
    eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:1D:65:AD  
              inet addr:192.168.0.20  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Base address:0x1070 Memory:ec820000-ec840000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

    On Ubuntu
    $ ping -c3 192.168.0.20
    Code:
    PING 192.168.0.20 (192.168.0.20) 56(84) bytes of data.
    From 192.168.0.10 icmp_seq=1 Destination Host Unreachable
    From 192.168.0.10 icmp_seq=2 Destination Host Unreachable
    From 192.168.0.10 icmp_seq=3 Destination Host Unreachable
    
    --- 192.168.0.20 ping statistics ---
    3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2001ms
    , pipe 3

    $ ping -c3 172.16.103.128
    Code:
    PING 172.16.103.128 (172.16.103.128) 56(84) bytes of data.
    64 bytes from 172.16.103.128: icmp_seq=1 ttl=64 time=0.921 ms
    64 bytes from 172.16.103.128: icmp_seq=2 ttl=64 time=0.159 ms
    64 bytes from 172.16.103.128: icmp_seq=3 ttl=64 time=0.116 ms
    
    --- 172.16.103.128 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2000ms
    rtt min/avg/max/mdev = 0.116/0.398/0.921/0.370 ms

    IP addr 192.168.0.20
    does not work


    Edit:

    On CentOS

    # ping -c3 yahoo.com
    Code:
    PING yahoo.com (216.109.112.135) 56(84) bytes of data.
    64 bytes from w2.rc.vip.dcn.yahoo.com (216.109.112.135): icmp_seq=1 ttl=128 time=40.7 ms
    64 bytes from w2.rc.vip.dcn.yahoo.com (216.109.112.135): icmp_seq=2 ttl=128 time=43.5 ms
    64 bytes from w2.rc.vip.dcn.yahoo.com (216.109.112.135): icmp_seq=3 ttl=128 time=45.7 ms
    
    --- yahoo.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2002ms
    rtt min/avg/max/mdev = 40.743/43.342/45.770/2.055 ms

    # ping -c3 satimis.com
    Code:
    PING satimis.com (220.232.213.178) 56(84) bytes of data.
    64 bytes from 220.232.213.178: icmp_seq=1 ttl=128 time=1.65 ms
    64 bytes from 220.232.213.178: icmp_seq=2 ttl=128 time=0.837 ms
    64 bytes from 220.232.213.178: icmp_seq=3 ttl=128 time=1.26 ms
    
    --- satimis.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2001ms
    rtt min/avg/max/mdev = 0.837/1.250/1.654/0.336 ms
    CentOS can ping Internet but can't ping Intranet


    satimis
    Last edited by satimis; 01-14-2008 at 01:19 PM. Reason: add more information

  3. #13
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    You need to read the VMWare Server Documentation

    When you create a NIC in your VM, you connect it to one of three "networks" in VMWare. Your choices are bridged, NAT'ed, or Host-Only.

    Bridged mode means that the VM NIC is connected directly to the same network as the host OS NIC (when you run VMWare config, you can choose which physical NIC is bridged.)

    NAT'ed means that (by default) the VM can talk out to the host OS, but nothing can get in to the VM. This is the same config as your home router - unless your forward ports, nothing can get in to your internal machines.

    Host-Only is just that - a private network segment that only VMWare routes. Only other VM's on the host-only segment can talk to each other - there is no route off of that subnet.

    Based on this, you cannot arbitrarily assign an IP to your VM on any subnet and expect it to work. If you want to use an IP in your VM on the 192.168 subnet, the NIC in the VM needs to be in bridged mode.

    If the NIC in VM is NAT'ed, only a valid address on the 172.16.103.0 segment will work.

    This is why your VM *can* connect out (using the 172 IP) and your Ubuntu *cannot* ping the guest via 192.168.

    If your VM NIC is on the NAT'ed network (which your postings show it is), then the only way for anything to be passed from Ubuntu into CentOS is to forward the necessary ports in VMWare.

    My orginal post had this link.

  4. #14
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,794
    Quote Originally Posted by HROAdmin26 View Post
    You need to read the VMWare Server Documentation

    When you create a NIC in your VM, you connect it to one of three "networks" in VMWare. Your choices are bridged, NAT'ed, or Host-Only.

    Bridged mode means that the VM NIC is connected directly to the same network as the host OS NIC (when you run VMWare config, you can choose which physical NIC is bridged.)

    NAT'ed means that (by default) the VM can talk out to the host OS, but nothing can get in to the VM. This is the same config as your home router - unless your forward ports, nothing can get in to your internal machines.

    Host-Only is just that - a private network segment that only VMWare routes. Only other VM's on the host-only segment can talk to each other - there is no route off of that subnet.

    Based on this, you cannot arbitrarily assign an IP to your VM on any subnet and expect it to work. If you want to use an IP in your VM on the 192.168 subnet, the NIC in the VM needs to be in bridged mode.

    If the NIC in VM is NAT'ed, only a valid address on the 172.16.103.0 segment will work.

    This is why your VM *can* connect out (using the 172 IP) and your Ubuntu *cannot* ping the guest via 192.168.

    If your VM NIC is on the NAT'ed network (which your postings show it is), then the only way for anything to be passed from Ubuntu into CentOS is to forward the necessary ports in VMWare.

    My orginal post had this link.
    Hi HROAdmin26,


    Thanks for your detail advice.


    Hereunder is the notes taken down previously on running
    "vmware-config.pl"
    Code:
    Making sure services for VMware Server are stopped.
    
    Stopping VMware services:
       Virtual machine monitor done
    
    Configuring fallback GTK+ 2.4 libraries.
    
    In which directory do you want to install the mime type icons? 
    [/usr/share/icons] [Enter]
    
    What directory contains your desktop menu entry files? These files have a 
    .desktop file extension. [/usr/share/applications] [Enter]
    
    In which directory do you want to install the application's icon? 
    [/usr/share/pixmaps] [Enter]
    
    Trying to find a suitable vmmon module for your running kernel.
    
    None of the pre-built vmmon modules for VMware Server is suitable for your 
    running kernel.  Do you want this program to try to build the vmmon module for 
    your system (you need to have a C compiler installed on your system)? [yes] [Enter]
    
    What is the location of the directory of C header files that match your running
    kernel? [/lib/modules/2.6.20-15-generic/build/include] [Enter]
    
    The module loads perfectly in the running kernel.
    
    Do you want networking for your virtual machines? (yes/no/help) [yes] [Enter]
    
    Configuring a bridged network for vmnet0.
    
    The following bridged networks have been defined:
    
    . vmnet0 is bridged to eth0
    
    All your ethernet interfaces are already bridged.
    
    Do you want to be able to use NAT networking in your virtual machines? (yes/no)
    [yes] [Enter]
    
    Configuring a NAT network for vmnet8.
    
    Do you want this program to probe for an unused private subnet? (yes/no/help) 
    [yes] [Enter]
    
    Probing for an unused private subnet (this can take some time)...
    
    The subnet 192.168.213.0/255.255.255.0 appears to be unused.
    
    The following NAT networks have been defined:
    
    . vmnet8 is a NAT network on private subnet 192.168.213.0.
    
    Do you wish to configure another NAT network? (yes/no) [no] [Enter]
    
    Do you want to be able to use host-only networking in your virtual machines? 
    [yes] [Enter]
    
    Configuring a host-only network for vmnet1.
    
    Do you want this program to probe for an unused private subnet? (yes/no/help) 
    [yes] [Enter]
    
    Probing for an unused private subnet (this can take some time)...
    
    The subnet 172.16.77.0/255.255.255.0 appears to be unused.
    
    The following host-only networks have been defined:
    
    . vmnet1 is a host-only network on private subnet 172.16.77.0.
    
    Do you wish to configure another host-only network? (yes/no) [no] [enter]
    
    ......
    The module loads perfectly in the running kernel.
    
    Please specify a port for remote console connections to use [902] [Enter]
    
    ....
    Generating SSL Server Certificate
    
    In which directory do you want to keep your virtual machine files? 
    [/var/lib/vmware/Virtual Machines] [Enter]
    
    The path "/var/lib/vmware/Virtual Machines" does not exist currently. This 
    program is going to create it, including needed parent directories. Is this 
    what you want? [yes] [Enter]
    
    Please enter your 20-character serial number.
    .....
    Please shed me some light on the mistake committed by me previously. I'll re-run "vmware-config.pl". TIA


    B.R.
    satimis

  5. #15
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    There is no mistake in the VMWare config - but what you are trying to do with the NIC's/IP's in the virtual machine will not work.

    In the config script you just posted, your virtual machine's NIC can be connected to one of 3 networks:

    1. Bridged directly to eth0 (because bridges are transparent, there is nothing in ifconfig in Ubuntu for the bridge connection)
    2. NAT'ed and on the subnet 192.168.213.0/255.255.255.0 (known as vmnet8 in Ubuntu ifconfig)
    3. Host-Only on the subnet 172.16.77.0/255.255.255.0 (known as vmnet1 in Ubuntu ifconfig)

    If your CentOS's NIC is on the NAT network, you cannot just pick any IP and use it - you need a valid IP for the subnet it's attached to (just like the real world.) In this case, it would need an IP in the 192.168.213.0/24 range. Also, VMWare runs a DHCP server on the NAT'ed and Host-Only networks, so guest OS's can just use DHCP as well.

    VMWare is very flexible and you can create multiple bridges (assuming the host OS has multiple NIC's), you can create more than one NAT network, and you can create more than one host-only network.

    This is how it works - so if your CentOS is on the NAT network, you must forward ports from Ubuntu into CentOS (through VMWare) in order to run any "server" applications. Previous link contains information on how to forward ports to the VMWare NAT network.

  6. #16
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    Copy paste your vmware configuration file / .vmx file here.

  7. #17
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,794
    Quote Originally Posted by athlon_crazy View Post
    Copy paste your vmware configuration file / .vmx file here.
    On Ubuntu

    $ sudo find / -name *.vmx
    Code:
    /home/satimis/OpenNMS_VMWare/opennms-vmware/opennms.vmwarevm/opennms.vmx
    /opt/VM/CentOS-5_lamp.x86_64/CentOS-5_lamp.x86_64.vmx

    $ cat /home/satimis/OpenNMS_VMWare/opennms-vmware/opennms.vmwarevm/opennms.vmx
    Code:
    config.version = "8"
    virtualHW.version = "6"
    scsi0.present = "TRUE"
    scsi0.virtualDev = "lsilogic"
    memsize = "756"
    MemAllowAutoScaleDown = "FALSE"
    scsi0:0.present = "TRUE"
    scsi0:0.fileName = "opennms.vmdk"
    ide1:0.present = "TRUE"
    ide1:0.fileName = "/Volumes/Steel/Virtualization/ISOs/mandriva-linux-2008.0-free-cd1-i586/mandriva-linux-2008.0-free-cd1-i586.iso"
    ide1:0.deviceType = "cdrom-image"
    floppy0.present = "FALSE"
    ethernet0.present = "TRUE"
    ethernet0.connectionType = "nat"
    ethernet0.wakeOnPcktRcv = "FALSE"
    usb.present = "TRUE"
    ehci.present = "FALSE"
    sound.present = "TRUE"
    sound.fileName = "-1"
    sound.autodetect = "TRUE"
    pciBridge0.present = "TRUE"
    isolation.tools.hgfs.disable = "TRUE"
    displayName = "opennms"
    guestOS = "mandriva"
    nvram = "opennms.nvram"
    deploymentPlatform = "windows"
    virtualHW.productCompatibility = "hosted"
    RemoteDisplay.vnc.port = "0"
    tools.upgrade.policy = "upgradeAtPowerCycle"
    powerType.powerOff = "soft"
    powerType.powerOn = "soft"
    powerType.suspend = "soft"
    powerType.reset = "soft"
    
    ethernet0.addressType = "generated"
    uuid.location = "56 4d a7 13 3a fd 2a 84-eb 11 9d be 7f 81 cb f1"
    uuid.bios = "56 4d a7 13 3a fd 2a 84-eb 11 9d be 7f 81 cb f1"
    scsi0:0.redo = ""
    pciBridge0.pciSlotNumber = "17"
    scsi0.pciSlotNumber = "16"
    ethernet0.pciSlotNumber = "32"
    sound.pciSlotNumber = "33"
    ehci.pciSlotNumber = "-1"
    ethernet0.generatedAddress = "00:0c:29:81:cb:f1"
    ethernet0.generatedAddressOffset = "0"
    tools.remindInstall = "TRUE"
    
    ide1:0.startConnected = "FALSE"
    
    chipset.useAcpiBattery = "TRUE"
    chipset.useApmBattery = "TRUE"
    
    usb.generic.autoconnect = "FALSE"

    $ cat /opt/VM/CentOS-5_lamp.x86_64/CentOS-5_lamp.x86_64.vmx
    Code:
     
    #!/usr/bin/vmware
    config.version = "8"
    virtualHW.version = "4"
    scsi0.present = "TRUE"
    scsi0.virtualDev = "lsilogic"
    memsize = "512"
    scsi0:0.present = "TRUE"
    scsi0:0.fileName = "CentOS-5_lamp.x86_64.vmdk"
    scsi0:0.writeThrough = "TRUE"
    ide1:0.present = "TRUE"
    ide1:0.fileName = "auto detect"
    ide1:0.deviceType = "atapi-cdrom"
    floppy0.fileName = "Auto detect"
    Ethernet0.present = "TRUE"
    Ethernet0.connectionType = "nat"
    Ethernet0.virtualDev = "e1000"
    displayName = "CentOS-5_lamp.x86_64"
    guestOS = "rhel4-64"
    priority.grabbed = "normal"
    priority.ungrabbed = "normal"
    powerType.powerOff = "hard"
    powerType.powerOn = "hard"
    powerType.suspend = "hard"
    powerType.reset = "hard"
    
    floppy0.startConnected = "FALSE"
    
    scsi0:0.redo = ""
    ide1:0.startConnected = "FALSE"
    ethernet0.addressType = "generated"
    ide1:0.autodetect = "TRUE"
    
    
    ethernet0.generatedAddress = "00:0c:29:1d:65:ad"
    uuid.location = "56 4d a0 ef 22 10 e8 cd-ca c6 16 63 25 1d 65 ad"
    uuid.bios = "56 4d a0 ef 22 10 e8 cd-ca c6 16 63 25 1d 65 ad"
    ethernet0.generatedAddressOffset = "0"
    satimis

  8. #18
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,794
    Quote Originally Posted by HROAdmin26 View Post
    There is no mistake in the VMWare config - but what you are trying to do with the NIC's/IP's in the virtual machine will not work.

    In the config script you just posted, your virtual machine's NIC can be connected to one of 3 networks:

    1. Bridged directly to eth0 (because bridges are transparent, there is nothing in ifconfig in Ubuntu for the bridge connection)
    2. NAT'ed and on the subnet 192.168.213.0/255.255.255.0 (known as vmnet8 in Ubuntu ifconfig)
    3. Host-Only on the subnet 172.16.77.0/255.255.255.0 (known as vmnet1 in Ubuntu ifconfig)

    If your CentOS's NIC is on the NAT network, you cannot just pick any IP and use it - you need a valid IP for the subnet it's attached to (just like the real world.) In this case, it would need an IP in the 192.168.213.0/24 range. Also, VMWare runs a DHCP server on the NAT'ed and Host-Only networks, so guest OS's can just use DHCP as well.

    VMWare is very flexible and you can create multiple bridges (assuming the host OS has multiple NIC's), you can create more than one NAT network, and you can create more than one host-only network.

    This is how it works - so if your CentOS is on the NAT network, you must forward ports from Ubuntu into CentOS (through VMWare) in order to run any "server" applications. Previous link contains information on how to forward ports to the VMWare NAT network.
    Thanks for your advice.


    Performed following test;


    On Ubuntu;

    Edit /etc/vmware/vmnet8/nat/nat.conf

    Uncommt following lines;
    # lynx http : //localhost:8888
    #8888 = 172.16.103.128:80


    $ cat /etc/vmware/vmnet8/nat/nat.conf
    Code:
    # Linux NAT configuration file
    [host]
    # NAT gateway address
    ip = 172.16.103.2
    netmask = 255.255.255.0
    # or ip = 172.16.103.2/24
    
    # enable configuration; disabled by default for security reasons
    #configport = 33445
    
    # VMnet device if not specified on command line
    device = /dev/vmnet8
    
    # Allow PORT/EPRT FTP commands (they need incoming TCP stream...)
    activeFTP = 1
    
    # Allows the source to have any OUI.  Turn this one if you change the OUI
    # in the MAC address of your virtual machines.
    #allowAnyOUI = 1
    
    [udp]
    # Timeout in seconds, 0 = no timeout, default = 60; real value might
    # be up to 100% longer
    timeout = 60
    
    [incomingtcp]
    # Use these with care - anyone can enter into your VM through these...
    
    # FTP (both active and passive FTP is always enabled)
    #      ftp localhost 8887
    #8887 = 172.16.103.128:21
    
    # WEB (make sure that if you are using named webhosting, names point to
    #     your host, not to guest... And if you are forwarding port other
    #     than 80 make sure that your server copes with mismatched port 
    #     number in Host: header)
          lynx http://localhost:8888
    8888 = 172.16.103.128:80
    
    # SSH
    #      ssh -p 8889 root@localhost
    #8889 = 172.16.103.128:22
    
    [incomingudp]
    # UDP port forwarding example
    #6000 = 172.16.103.128:6001

    $ sudo /usr/lib/vmware/net-services.sh restart
    Code:
       Bridged networking on /dev/vmnet0                                   done
       DHCP server on /dev/vmnet1                                          done
       Host-only networking on /dev/vmnet1                                 done
       DHCP server on /dev/vmnet8                                          done
       NAT service on /dev/vmnet8                                          done
       Host-only networking on /dev/vmnet8                                 done
       Bridged networking on /dev/vmnet0                                   done
       Host-only networking on /dev/vmnet1 (background)                    done
       Host-only networking on /dev/vmnet8 (background)                    done
       NAT service on /dev/vmnet8                                          done
    $ sudo /etc/init.d/apache2 stop
    Code:
     * Stopping web server (apache2)...                                         [ OK ]

    On CentOS

    # ifconfig
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0C:29:1D:65:AD  
              inet addr:172.16.103.128  Bcast:172.16.103.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe1d:65ad/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1353 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1142 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:355206 (346.8 KiB)  TX bytes:196238 (191.6 KiB)
              Base address:0x1070 Memory:ec820000-ec840000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:96 errors:0 dropped:0 overruns:0 frame:0
              TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:27981 (27.3 KiB)  TX bytes:27981 (27.3 KiB)

    # /etc/init.d/httpd status
    Code:
    httpd (pid 2911 2910 2909 2908 2907 2906 2905 2904 2902) is running...

    On Ubutun Firefox run
    https://satimis.com
    https://satimis.com:80

    Can't browse Apache 2 Test Page


    satimis

  9. #19
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    A) Why is the "lynx" line uncommented in the NAT config? You only need the 8888 line.

    B) If you did not modify the httpd config in CentOS, you are running a *plaintext* httpd server on CentOS's port 80 - why are you using https:// in your address?

    C) From your config, you are saying that when a packet hits port 8888 in Ubuntu, forward it to port 80 on the NAT'ed VMWare network - so you need to request port 8888 in an external web browser.

    D) www.domain.com (I am assuming) resolves to an external, public IP - if you are testing this from Ubuntu, you are trying to get to an IP that would make your router "loopback" through itself. This is a bad thing and most routers won't do it. So using a name like www.domain.com *from inside* your private network is probably not going to work.

    E) Have you verified the webserver is even running/working in CentOS? From command line in CentOS, try using something like wget to pull a webpage from IP 172.16.103.128 - port 80.

    F) If THAT works, use Firefox on Ubuntu to open http://172.16.103.128 (Might want to ping 172.16.103.128 as well.)

    G) To test *for sure* that this all works with www.domain.com, have someone else on the Internet try to reach http://www.domain.com:8888

  10. #20
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,794
    Quote Originally Posted by HROAdmin26 View Post
    A) Why is the "lynx" line uncommented in the NAT config? You only need the 8888 line.

    B) If you did not modify the httpd config in CentOS, you are running a *plaintext* httpd server on CentOS's port 80 - why are you using https:// in your address?

    C) From your config, you are saying that when a packet hits port 8888 in Ubuntu, forward it to port 80 on the NAT'ed VMWare network - so you need to request port 8888 in an external web browser.

    D) www.domain.com (I am assuming) resolves to an external, public IP - if you are testing this from Ubuntu, you are trying to get to an IP that would make your router "loopback" through itself. This is a bad thing and most routers won't do it. So using a name like www.domain.com *from inside* your private network is probably not going to work.

    E) Have you verified the webserver is even running/working in CentOS? From command line in CentOS, try using something like wget to pull a webpage from IP 172.16.103.128 - port 80.

    F) If THAT works, use Firefox on Ubuntu to open http://172.16.103.128 (Might want to ping 172.16.103.128 as well.)

    G) To test *for sure* that this all works with www.domain.com, have someone else on the Internet try to reach http://www.domain.com:8888
    Hi HROAdmin26,


    Before receiving your posting, performed following test;

    Start VMware Server Console
    Select Centos virtual machine
    "Edit virtual machine settings" --> "Virtual Machine Settings" --> "Hardware" --> "Ethernet" Device --> "Network connection" --> choose "Bridged: Connected directly to the physical network"


    Start CentOS


    # ifconfig
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0C:29:1D:65:AD  
              inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe1d:65ad/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:10 errors:0 dropped:0 overruns:0 frame:0
              TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:1698 (1.6 KiB)  TX bytes:8440 (8.2 KiB)
              Base address:0x1070 Memory:e8820000-e8840000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
    It automatically selects "inet addr:192.168.0.11", the subnet setting of the router.


    # ifconfig eth0 192.168.0.20 netmask 255.255.255.0
    No complaint


    # ifconfig
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0C:29:1D:65:AD  
              inet addr:192.168.0.20  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe1d:65ad/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:15 errors:0 dropped:0 overruns:0 frame:0
              TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2237 (2.1 KiB)  TX bytes:10402 (10.1 KiB)
              Base address:0x1070 Memory:e8820000-e8840000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
    # /etc/init.d/httpd start
    Starting httpd: [ OK ]


    # /etc/init.d/network restart
    Code:
    Shutting down loopback interface:                          [  OK  ]
    Bringing up loopback interface:                            [  OK  ]
    Bringing up interface eth0:  
    Determining IP information for eth0... done.
                                                               [  OK  ]

    On Ubuntu
    $ sudo /etc/init.d/apache2 stop
    Code:
    Password:
     * Stopping web server (apache2)...                                      [ OK ]

    On Firefox running;

    https://satimis.com
    https://satimis.com:8080
    https://satimis.com:80
    etc.

    None of them can visit the "Apache 2 Test Page" on CentOS


    Besides, on Ubuntu;
    $ ssh 192.168.0.20
    Code:
    ssh: connect to host 192.168.0.20 port 22: No route to host
    Unable to ssh connect CentOS


    $ ping -c3 192.168.0.20
    Code:
    PING 192.168.0.20 (192.168.0.20) 56(84) bytes of data.
    From 192.168.0.10 icmp_seq=1 Destination Host Unreachable
    From 192.168.0.10 icmp_seq=2 Destination Host Unreachable
    From 192.168.0.10 icmp_seq=3 Destination Host Unreachable
    
    --- 192.168.0.20 ping statistics ---
    3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2000ms
    , pipe 3

    However on CentOS it can ping Ubuntu "192.168.0.10"


    B.R.
    satimis

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •