Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
Hi folks, Ubuntu 7.04 server amd64 (Host OS) CentOS 5 x86_64 (Guest OS) VMWare Server CentOS 5, inet addr - 172.16.103.128 I have only one fixed IP alloted by ISP ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814

    How to connect the Mail Server running on Guest OS of VMWare


    Hi folks,


    Ubuntu 7.04 server amd64 (Host OS)
    CentOS 5 x86_64 (Guest OS)
    VMWare Server
    CentOS 5, inet addr - 172.16.103.128


    I have only one fixed IP alloted by ISP and one domain. They are used by Ubuntu. How can I connect the Mail Server/Web server running on CentOS 5? TIA


    Edit:

    Network connection;

    Server -> Router -> DSL Modem -> Internet

    The router is on loan from ISP. They use it as gateway. I can't touch it.

    Intranet IP address (router ip addr)
    Ubuntu - 192.168.0.10
    CentOS - 172.16.103.128 ( found with ifconfig)

    Only one NIC on the PC


    B.R.
    satimis
    Last edited by satimis; 01-11-2008 at 03:42 PM. Reason: adding more info

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    You have one "public" IP....

    You can:

    A) Buy your own router to connect to the DSL modem. Then you would have a *nearly* limitless range of IP's you could use behind the router. You could make the NIC for the VM guest "bridged" and use the same IP range that Ubuntu is using. You would need to forward the necessary ports through the router (SMTP:25 and any other ports you needed access to.)

    * Note: VMWare *bridged* networks do not work with wireless connections. So if your Ubuntu is on a laptop using wireless to the router, you can't use a bridged NIC in the guest OS.

    B) Keep things the way they are. You STILL need to forward ports from the router > Ubuntu > (Thru VMWare) CentOS - which means someone must modify the config on the router.

    Port Forwarding - VMWare Server on Linux

    GL.

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by HROAdmin26 View Post
    You have one "public" IP....

    You can:

    A) Buy your own router to connect to the DSL modem. Then you would have a *nearly* limitless range of IP's you could use behind the router. You could make the NIC for the VM guest "bridged" and use the same IP range that Ubuntu is using. You would need to forward the necessary ports through the router (SMTP:25 and any other ports you needed access to.)

    * Note: VMWare *bridged* networks do not work with wireless connections. So if your Ubuntu is on a laptop using wireless to the router, you can't use a bridged NIC in the guest OS.

    B) Keep things the way they are. You STILL need to forward ports from the router > Ubuntu > (Thru VMWare) CentOS - which means someone must modify the config on the router.

    Port Forwarding - VMWare Server on Linux

    Hi GL.
    ,


    Thanks for your advice and URL.

    Just found on Ubuntu (Host OS) with;

    $ ifconfig
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0E:A6:F9:A3:5B  
              inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::20e:a6ff:fef9:a35b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3354 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2909 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:3215495 (3.0 MiB)  TX bytes:513664 (501.6 KiB)
              Interrupt:23 Base address:0xe000 
    
    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:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    
    vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01  
              inet addr:172.16.59.1  Bcast:172.16.59.255  Mask:255.255.255.0
              inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    
    vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08  
              inet addr:172.16.103.1  Bcast:172.16.103.255  Mask:255.255.255.0
              inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    What will be the use of following inet addr;
    Code:
    vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01  
              inet addr:172.16.59.1  Bcast:172.16.59.255  Mask:255.255.255.0
    
    vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08  
              inet addr:172.16.103.1  Bcast:172.16.103.255  Mask:255.255.255.0
    ???

    Are they for CentOS. I recall on installing VMWare it asked whether sharing NIC.?

    I selected YES.


    satimis

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    Use network aliases onto ubuntu so that you have same ip range with centos.

    ~$:ifconfig eth0:0 172.16.xx.xx up

  6. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by athlon_crazy View Post
    Use network aliases onto ubuntu so that you have same ip range with centos.

    ~$:ifconfig eth0:0 172.16.xx.xx up
    Could you please provide more details. On which OS, Ubuntu/CentOs to run that command?


    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:81 errors:0 dropped:0 overruns:0 frame:0
              TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:9632 (9.4 KiB)  TX bytes:15868 (15.4 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:74 errors:0 dropped:0 overruns:0 frame:0
              TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:19072 (18.6 KiB)  TX bytes:19072 (18.6 KiB)
    I suppose "inet addr:172.16.103.128" is the fixed IP of CentOS? Thanks


    B.R.
    satimis

  7. #6
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    either one should be working :

    Ubuntu = ~$:ifconfig eth0:0 172.16.xx.xx netmask 255.255.255.0

    OR

    centos = ~$:ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0

  8. #7
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by athlon_crazy View Post
    either one should be working :

    Ubuntu = ~$:ifconfig eth0:0 172.16.xx.xx netmask 255.255.255.0

    OR

    centos = ~$:ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0
    Thanks for your advice.


    A further thought if both mailers and apache2 are running on Ubuntu and CentOS respectively, in my case;

    sendmail on CentOS
    postfix on Ubuntu

    where will the incoming emails be delivered, to sendmail or to postfix OR to both of them?


    On Internet running "https://satimis.com" on remote browser which homepage will be visited, apache on CentOS or on Ubuntu?


    B.R.
    satimis

  9. #8
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    Suppose one specific port for one services only. It's your choice which services you want to run on which servers. If you choose sendmail on centos, turn off postfix service in ubuntu.

    Same as apache, choose only one server to act as web server otherwise, use different port to have 2 web server run at the same time. Perhaps centos apache use port 80 and ubuntu apache use port 8080.

  10. #9
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by athlon_crazy View Post
    Suppose one specific port for one services only. It's your choice which services you want to run on which servers. If you choose sendmail on centos, turn off postfix service in ubuntu.
    Noted with thanks.

    If I have 2 domains and one fixed/public IP can I run 2 Mail Servers? port 25 for postfix on Ubuntu and port 443 for sendmail on CentOS?


    Same as apache, choose only one server to act as web server otherwise, use different port to have 2 web server run at the same time. Perhaps centos apache use port 80 and ubuntu apache use port 8080.
    Noted and thanks

    satimis

  11. #10
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Hi athlon_crazy,


    Performed following test w/o success

    1)
    On Ubuntu

    connect CentOS
    $ ssh 172.16.103.128
    satimis@172.16.103.128's password:
    $ su -
    Password:

    # 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:83 errors:0 dropped:0 overruns:0 frame:0
              TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:10046 (9.8 KiB)  TX bytes:16808 (16.4 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: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)
    # ifconfig eth0:0 192.168.0.20
    No complaint

    # 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:469 errors:0 dropped:0 overruns:0 frame:0
              TX packets:447 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:256458 (250.4 KiB)  TX bytes:70495 (68.8 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)

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

    # /etc/init.d/httpd start
    Code:
    Starting httpd:                                            [  OK  ]

    Called ISP requesting to make following change;

    forward port 8080 to IP addr 192.168.0.20


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

    On Firefox;
    running:-
    http://www.satimis.com
    http://www.satimis.com:8080 (just hanging)
    http://www.satimis.com/8080

    https://www.satimis.com
    https://www.satimis.com:8080 (just hanging)
    https://www.satimis.com/8080

    All failed.


    2)
    On CentOS Firefox running;
    localhost

    start
    Code:
    Apache 2 Test Page
    powered by CentOS

    Any advice? TIA


    B.R.
    satimis

Page 1 of 2 1 2 LastLast

Posting Permissions

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