Custom nat from lan
-
i am trying to add a rule to interfaces.inc as the gui does not support it.
where ever i add it it seems to strip out all my outbound natscan someone offer a solution of how or where i can put this.
my ruleset is
anchor "smtpredirection"
table <smtpredirection>{ 192.168.50.0/24 }
rdr on {$lanif} proto tcp from <smtpredirection>to any port 25 -> 10.250.3.36
nat on {$lanif} proto tcp from <smtpredirection>to any port 25 -> {$lanif}my syntax was
/* anchor the outbound nat rules */
$natrules = "# outbound email rules for spam trap\n";
$natrules .= "table <smtpredirection>{ 192.168.50.0/24 }\n";
$natrules .= "rdr on {$lanif} proto tcp from <smtpredirection>to any port 25 -> 10.250.3.36\n";
$natrules .= "nat on {$lanif} proto tcp from <smtpredirection>to any port 25 -> {$lanif}\n";</smtpredirection></smtpredirection></smtpredirection></smtpredirection></smtpredirection></smtpredirection> -
You can setup these kind of portforwards from the gui. Set it up as portforward on interface LAN with "external adress" any.
-
The portforward option is in Firewall: NAT: Port Forward
-
but what i want to do is this
< 192.168.50.1/32 192.168.50.2/32 192.168.50.128/25 >
and the rest of the clients dont get natted by the smtp rule
-
That is sourcebased natting which is not supported atm.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy