Koozali.org: home of the SME Server

How do I SME 9.1 in VirtualBox - only as gateway

Offline SchulzStefan

  • *
  • 620
  • +0/-0
How do I SME 9.1 in VirtualBox - only as gateway
« on: March 31, 2016, 08:17:14 AM »
Bad luck with my ISP. Our old provider pulled the plug too early. Unfortunately the new ISP is not on start yet.

Currently the SME 9.1 is configured as mailserver fetching the emails from a catchall account to distribute in the local net. Now as we are not able to connect via IPcop in the internet (SME is behind the Cop) the idea is to install a virtual SME 9.1 on a WIN7 host with virtualbox.

Assuming the WIN7 machine is in the local net (which is still full functional even without internet connection) and has access to the internet with a surfstick, how do I have to configure the networking in virtualbox and in the SME server?

If the virtual SME server fetches the email, would it then be easier to forward the mails to the real SME server? Or is it easier to configure the real server to fetch the mails from the virtual SME server?

I hope I'm clear with my problem and the idea about this temporarily solution (til the new provider connects us back to the world).

Any suggestions/help are appreciated and would help me saving a lot of time. Excellent would be any hint how-to configure the network in virtualbox and in the virtual SME server.

Thanks in advance for any help.
stefan
« Last Edit: April 04, 2016, 07:39:54 PM by SchulzStefan »
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: *SOLVED* How do I SME 9.1 in VirtualBox - only as mailserver
« Reply #1 on: March 31, 2016, 01:13:00 PM »
You've marked this solved--is it?  If so, would you share how you resolved the issue?
......

Offline SchulzStefan

  • *
  • 620
  • +0/-0
Re: *SOLVED* How do I SME 9.1 in VirtualBox - only as mailserver
« Reply #2 on: March 31, 2016, 01:21:41 PM »
Found a solution:

Laptop is running on WIN7 prof. which is the host. Latest VirtualBox and extensions installed.

Two networks have to be enabled:
- NAT as first adapter for internet access
- ethernet-bridge as second adapter for LAN access

Installed SME as virtual guest. The server is configured as private server and gateway. The MAC of the bridged card has to be assigned with a LAN IP. The MAC of the NAT is configured as "DHCP with MAC". The gateway is the IP of the virtual adapter in WIN7. In my case ipconfig in the WIN7 terminal shows 192.168.56.1.

Now the virtual server is connected to the internet and also to the LAN.

What's left? To configure the virtual SME to fetch the emails and forward all mails to the real server. Or to configure the real server to fetch the mails from the virtual server. Don't know (yet) what's easier or faster.
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)

Offline SchulzStefan

  • *
  • 620
  • +0/-0
Re: *SOLVED* How do I SME 9.1 in VirtualBox - only as mailserver
« Reply #3 on: March 31, 2016, 01:25:35 PM »
You've marked this solved--is it?  If so, would you share how you resolved the issue?

Always  :-)
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)

Offline SchulzStefan

  • *
  • 620
  • +0/-0
Re: *SOLVED* How do I SME 9.1 in VirtualBox - only as mailserver
« Reply #4 on: March 31, 2016, 10:38:07 PM »
Update:

Nothing's left. I was thinking too complicated.

Fetching or forwarding in the virtual SME isn't needed. The real server's gateway has to be changed to the bridged IP of the virtual server. If DHCP is used, this has to be switched to the virtual SME. And, of course, the real network adapter of the laptop has to be configured in the network range of the LAN. *NOT* by DHCP. Can be checked in WIN7 with the cmd and ipconfig.

This can be only a temporarily solution (for me). There are a lot of important things which are managed by the IPCop. Today is Thursday, our old ISP told us that we're back online latest on Monday.

The IPCop is still untouched, power it on, turning the gateway back to the IPCop, and we are back on track. Til the new ISP comes up...
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)

Offline SchulzStefan

  • *
  • 620
  • +0/-0
Re: How do I SME 9.1 in VirtualBox - only as mailserver
« Reply #5 on: April 04, 2016, 01:58:30 PM »
It turned out, that sending emails with this configuration is not possible. The receiving of the mails is working.

Need some help.

1. First
real server is configured to fetch and receive emails through a virtual domain via ISP. It connects to pop and smtp with the credentials of the service provider. The virtual domain is our external email-domain. That works flawlessly behind the IPCop. The gateway for the server was the IPCop.

2. Now
IPCop is down. I set up a virtual SME server in private server and gateway modus which is connected to the internet. I changed the gateway of the rael server from the IPCop to the virtual server. I left anything else untouched.

We do receive emails. The routing to the users works as expected. Sending emails from the real server with the virtual server as gateway does not work.

Here are some messages:

tail -f /var/log/smtp-auth-proxy/current
-- snip
No SMTP connection to server smtp.xxx.de on port 25
-- snip

The SMTP is the untouched configuration to our ISP. As I mentioned, the xxx.de is also a virtual domain on the real server.

and:

tail -f /var/log/qmail/current
--snip
Connected_to_127.0.0.1_but_greeting_failed./Remote_host_said:_451_Upstream_SMTP_server_not_available/
--snip

I'm able to ping any FQHN from the real server through the gateway, which is the virtual server. It's also possible, to ping any IP whether in the LAN or in the WAN.

So what's wrong? That's a thing beyond my knowledge. Would be very nice to get a hint or help.

Thank's in advance,
stefan
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)

Offline SchulzStefan

  • *
  • 620
  • +0/-0
Re: How do I SME 9.1 in VirtualBox - only as gateway
« Reply #6 on: April 07, 2016, 12:44:52 PM »
I think, I started a wrong approach.

Now - I setup a virtual box with an IPCop.

Easy, that works, everything is fine.
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)