<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to force certain external IPs to go through certain gateways]]></title><description><![CDATA[<p dir="auto">I have a pfSense installed yesterday from the downloaded VMWare image.<br />
I have 3 WAN interfaces, on different /24 subnets, all connected to NAT routers of one kind or another.<br />
All the routers have a DMZ set up to point to the pfSense IP address on their own subnet.<br />
The pfSense has its own NAT set up.<br />
The LAN interface is connected to an internal router on 192.168.100.1, which routes to 2 other subnets.<br />
I have static routes for the other subnets with gateway 192.168.100.1.</p>
<p dir="auto">I want all traffic from everywhere on the LAN to a particular IP address to go via one particular WAN interface.<br />
I also want all traffic from everywhere on the LAN to port 25 to go via one particular WAN interface.</p>
<p dir="auto">I have set up two firewall rules on the LAN.</p>
<ul>
<li>
<ul>
<li>
<ul>
<li>fixed * (WAN interface)</li>
</ul>
</li>
</ul>
</li>
<li>
<ul>
<li>
<ul>
<li>SMTP * (WAN interface)</li>
</ul>
</li>
</ul>
</li>
</ul>
<p dir="auto">fixed is a host alias with the ip address I want<br />
SMTP is a port alias for port 25</p>
<p dir="auto">However, if I do a traceroute from inside the LAN to the ip address specified in the alias, it sometimes goes via one of the other WAN interfaces.</p>
<p dir="auto">Am I doing this wrong?<br />
Is the NAT confusing things?<br />
Should I be setting up a static route for the fixed IP address instead?<br />
If the fixed IP address rule doesn't work, why should the SMTP rule (which can't be done with a static route) work?</p>
]]></description><link>https://forum.netgate.com/topic/23470/how-to-force-certain-external-ips-to-go-through-certain-gateways</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 03:58:53 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/23470.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 May 2010 09:42:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Fri, 14 May 2010 15:27:30 GMT]]></title><description><![CDATA[<p dir="auto">I withdraw the complaint in shame and bewilderment - I can no longer reproduce the problem!</p>
<p dir="auto">I have just done 6 tracerts to the fixedip address, and they all went through the correct gateway.</p>
<p dir="auto">Thanks very much for helping though (and at least my SMTP rule works properly, now you've kindly debugged it for me)  :D</p>
]]></description><link>https://forum.netgate.com/post/232735</link><guid isPermaLink="true">https://forum.netgate.com/post/232735</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Fri, 14 May 2010 15:27:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Fri, 14 May 2010 14:56:56 GMT]]></title><description><![CDATA[<p dir="auto">Can you show us a screenshot of what you get when you mouseover the "fixedip" alias?  Then, if possible, show us a traceroute giving you the unexpected behavior?  (On windows, I'd suggest "tracert -d whatever.you.are.going.to)</p>
<p dir="auto">(Please confirm the pfSense box's IP as well as the IP of the machine you're testing from, for completeness.)</p>
]]></description><link>https://forum.netgate.com/post/232724</link><guid isPermaLink="true">https://forum.netgate.com/post/232724</guid><dc:creator><![CDATA[overand]]></dc:creator><pubDate>Fri, 14 May 2010 14:56:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Thu, 13 May 2010 13:29:46 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for pointing out the problem with the SMTP rule. It shows the danger of using aliases. I would have expected the UI to tell me if I used a port alias in an IP address field. Are rules not validated at all?</p>
<p dir="auto">However, that's not the rule I am trying to debug.</p>
<p dir="auto">Please concentrate on the rule I am trying to debug, which is the one which should send all data destined for the IP address in the alias "fixedip" out via WAN1.</p>
]]></description><link>https://forum.netgate.com/post/232583</link><guid isPermaLink="true">https://forum.netgate.com/post/232583</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Thu, 13 May 2010 13:29:46 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Thu, 13 May 2010 09:33:03 GMT]]></title><description><![CDATA[<p dir="auto">So if i read this right:<br />
you have an alias SMTP which contains the port 25.<br />
And you use this alias in the destination fiel which expects an IP.<br />
Try to set this alias in the field destination-port instead of destination.<br />
For this you have to set the protocol to Tcp/udp. Otherwise the destination port field is hidden.</p>
]]></description><link>https://forum.netgate.com/post/232558</link><guid isPermaLink="true">https://forum.netgate.com/post/232558</guid><dc:creator><![CDATA[GruensFroeschli]]></dc:creator><pubDate>Thu, 13 May 2010 09:33:03 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Thu, 13 May 2010 09:00:23 GMT]]></title><description><![CDATA[<p dir="auto">Perhaps you are running a different version of pfSense to me - if you check the attached against my original post, you will see the original post was correct (aside from my changing the names).</p>
<p dir="auto">I have censored the output - I am not happy about revealing more of my firewall setup than absolutely necessary on the public Internet. The IP address shown is the internal IP address of my first ADSL router.</p>
<p dir="auto"><img src="/public/_imported_attachments_/1/firewall.JPG" alt="firewall.JPG" class=" img-fluid img-markdown" /><br />
<img src="/public/_imported_attachments_/1/firewall.JPG_thumb" alt="firewall.JPG_thumb" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.netgate.com/post/232555</link><guid isPermaLink="true">https://forum.netgate.com/post/232555</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Thu, 13 May 2010 09:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Wed, 12 May 2010 23:57:52 GMT]]></title><description><![CDATA[<p dir="auto">Well, the columns don't match up with what my web interface looks like, and you can't have any in the protocol field with a port specified, so there's a disconnect somewhere…</p>
<p dir="auto">Please just take a screenshot, it makes things much more clear.</p>
]]></description><link>https://forum.netgate.com/post/232516</link><guid isPermaLink="true">https://forum.netgate.com/post/232516</guid><dc:creator><![CDATA[ktims]]></dc:creator><pubDate>Wed, 12 May 2010 23:57:52 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Wed, 12 May 2010 17:39:45 GMT]]></title><description><![CDATA[<p dir="auto">I promise it's right. I've checked it more than twice.</p>
]]></description><link>https://forum.netgate.com/post/232487</link><guid isPermaLink="true">https://forum.netgate.com/post/232487</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Wed, 12 May 2010 17:39:45 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Wed, 12 May 2010 08:55:43 GMT]]></title><description><![CDATA[<p dir="auto">You typed what you think you have.<br />
A screenshot shows what you actually have.<br />
You wouldn't believe what kind of descriptions we've got here and the screenshot showed that the rules weren't anything like described ;)</p>
]]></description><link>https://forum.netgate.com/post/232417</link><guid isPermaLink="true">https://forum.netgate.com/post/232417</guid><dc:creator><![CDATA[GruensFroeschli]]></dc:creator><pubDate>Wed, 12 May 2010 08:55:43 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Wed, 12 May 2010 08:11:32 GMT]]></title><description><![CDATA[<p dir="auto">A screenshot of my rules will tell you no more than the typed in "screenshot" I included in the first message (other than revealing the actual internal IP address of the external ADSL router in question).</p>
]]></description><link>https://forum.netgate.com/post/232415</link><guid isPermaLink="true">https://forum.netgate.com/post/232415</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Wed, 12 May 2010 08:11:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Tue, 11 May 2010 20:21:54 GMT]]></title><description><![CDATA[<p dir="auto">Ah.<br />
In the previous description it sounded like you're trying to force one of your internal clients to a specific WAN.</p>
<p dir="auto">Can you show a screenshot of your rules?</p>
]]></description><link>https://forum.netgate.com/post/232387</link><guid isPermaLink="true">https://forum.netgate.com/post/232387</guid><dc:creator><![CDATA[GruensFroeschli]]></dc:creator><pubDate>Tue, 11 May 2010 20:21:54 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Tue, 11 May 2010 18:07:18 GMT]]></title><description><![CDATA[<p dir="auto">That makes no sense to me at all.<br />
fixedip is an address out there on the Internet.<br />
I want all packets <strong>FROM</strong> my LAN <strong>TO</strong> fixedip to go via my 1st WAN port<br />
Why should I put fixedip in as the <strong>SOURCE</strong> of the packets???</p>
<p dir="auto">Just to clarify, the reason for this is that fixedip has its own firewall, which will only accept connections from 1 IP address, the external address of my 1st WAN router.</p>
]]></description><link>https://forum.netgate.com/post/232379</link><guid isPermaLink="true">https://forum.netgate.com/post/232379</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Tue, 11 May 2010 18:07:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Tue, 11 May 2010 15:24:23 GMT]]></title><description><![CDATA[<p dir="auto">You use the alias in the field "destination".<br />
You have to use it in the field "source" :)</p>
]]></description><link>https://forum.netgate.com/post/232373</link><guid isPermaLink="true">https://forum.netgate.com/post/232373</guid><dc:creator><![CDATA[GruensFroeschli]]></dc:creator><pubDate>Tue, 11 May 2010 15:24:23 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Tue, 11 May 2010 13:49:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gruensfroeschli">@<bdi>GruensFroeschli</bdi></a>:</p>
<blockquote>
<p dir="auto">A traceroute uses ICMP.<br />
Your rule is for port 25. (probably TCP or UDP)<br />
So this is testing oranges for apples.</p>
<p dir="auto">Try telnet on port 25 and you should see that you go to the correct gateway.</p>
</blockquote>
<p dir="auto">I probably didn't explain very well. I am not expecting the traceroute to be intercepted by the SMTP rule, but by the fixed IP rule.</p>
<p dir="auto">The rule has:<br />
Interface:LAN<br />
Protocol: any<br />
Source: any<br />
Destination: Single host or alias : fixedip<br />
Gateway: My WAN ADSL router's address</p>
<p dir="auto">The fixedip alias has:<br />
Name: fixedip<br />
Type: Host(s)<br />
IP: (the IP address)</p>
]]></description><link>https://forum.netgate.com/post/232355</link><guid isPermaLink="true">https://forum.netgate.com/post/232355</guid><dc:creator><![CDATA[nikkilocke]]></dc:creator><pubDate>Tue, 11 May 2010 13:49:59 GMT</pubDate></item><item><title><![CDATA[Reply to How to force certain external IPs to go through certain gateways on Tue, 11 May 2010 10:44:34 GMT]]></title><description><![CDATA[<p dir="auto">A traceroute uses ICMP.<br />
Your rule is for port 25. (probably TCP or UDP)<br />
So this is testing oranges for apples.</p>
<p dir="auto">Try telnet on port 25 and you should see that you go to the correct gateway.</p>
]]></description><link>https://forum.netgate.com/post/232331</link><guid isPermaLink="true">https://forum.netgate.com/post/232331</guid><dc:creator><![CDATA[GruensFroeschli]]></dc:creator><pubDate>Tue, 11 May 2010 10:44:34 GMT</pubDate></item></channel></rss>