Avatar of AJNS
 asked on

Sonicwall port forward email to vpn

We've had a hardware failure of our spam box and while it is down I want to forward email directly to the email servers. For most I just created a new rule in my sonicwall to send it directly to the email server which is on our lan. One of the email servers is on the other end of a vpn.

The vpn is between my sonicwall tz205 and a tz105. The tunnel is up and working fine. On my lan if I telnet across the vpn to the email server it works just fine but I cannot get the sonicwall to do it. It seems like a pretty simple idea.

I searched google and found a couple of resources for doing this and followed them step by step but it doesn't work for me. There must be a simple way to tell the sonic wall to just forward the mail coming from one external IP address to an IP address on the vpn but I can't seem to find it.

Any help is appreciated.
Email ServersHardware FirewallsInternet / Email Software

Avatar of undefined
Last Comment

8/22/2022 - Mon

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.

I have five different IP addresses on the wan of the firewall. There is a dns record for each and each goes internet -> Firewall -> spam box for inbound. For this particular one the spam box then forwards the email to the client site over the vpn.

I just need to skip the box. For this mail server I tried changing the IP address of the address object for the server to send it to the mail server instead of the spam box but it didn't work. I edited the address object a second time and changed it from the lan zone to the vpn zone but it still didn't work.

I think the issue is I have to allow traffic from the wan to the vpn as well but I'm not sure how to do this for just the Wan IP address I need.

See whether you can define an object on the LOCAL Lan that translates through the VPN to the remote mail server.

Not familiar enough with somicwall settings options.

Do you have an SMTP that can be configured to accept messages for this domain but will then forward it to the One through the VPN.

Let's say your LAN on the inbound is on the remote LAN mailserver has
Create a virtualIP that redirects to natting the source I.e. The mail server on will see the request as coming from
Then using a local system on the lan see whether you can connect to 25 and get the response from the remore mail server.  If you can, you would then alter this forwarding rule instead of going to to port 25 and see if that lets you do what you need.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.

This really should have been easy to do at the firewall but would just not work.

What I ended up doing was setting up an external relay domain in Exchange 2013 and a send connector for the domain. I then updated the smtp rule on the firewall to forward email to Exchange 2013 which then relays it over the vpn to Exchange.

This did not occur to me until I read the bottom of your first post again about having IIS relay. That made me think of Exchange relaying so thank you for that.