Routing mail to a next gateway from within Pfsense - email fails with attachment
-
I am having the following issue when trying to route email traffic from pfsense to another internet gateway on my lan. This is how I have things set up.
pfsense configured with vlan and opt interfaces using one physical interface.
vlan1- Lan 172.16.50.85
vlan2- wan 10.11.12.2
vlan3- opt1 192.168.50.2Pfsense is the default gateway on my network for all clients. Pfsense is setup with DHCP server on LAN interface. I have two routers on my network with internet access. Pfsense is configured to use router1 (10.11.12.1) as its gateway to the internet. I have another router called router2 on the same subnet as the pfsense. I created a static route on pfsense's LAN interface to route traffic destined to our mail server hosted on the internet to use the internet on router2. With pfsense as the default gateway on any LAN client and the static route configured on pfsense this is the outcome. 1)If I compose an email from outlook without any attachment it is sent without any problem.
2)If I compose an email with an attachment I get the following error. "sending reported error (ox800CCC0F): The connection was interrupted. If the problem continues, contact your server administrator or internet service provider." If I disable the static route and the traffic is routed through pfsense wan interface it works fine.If I use the router as the default gateway on any lan client the email goes without any problem so I know the issue is on pfsense. What I don't know is where exactly on pfsense the issue is.
Can anyone tell me where to look to solve this issue. The reason why I want this configuration is because of bandwidth issue and trying to use the other connection for mail.
Any feedback would be greatly appreciated.
-
That's not a pfSense issue. You cannot route packets from a LAN device over another LAN device (pfSense) to a third one (router). You will get an asymmetric routing this way.
requests will go
PC > pfSense > router > WAN
responses go
WAN > router > PCSo the PC sends its packets to pfSense (10.11.12.1) (default gateway), while responses are coming from the routers IP.
Connect the router to an additional (vlan) interface of pfSense and make a transit network between them.
-
Thanks for your interest and response. I will see what I can do to make it happen. I have an additional opt interface on pfsense that I can connect to the router's vlan interface. Is this what you meant?
-
Yes, routing is only possible if any packets of both direction has to pass the router.
PC –---- router 1 ------ [router 2] –---- internet