Bulk add SNAT rules for 1024 public WAN IPs (datacentre project)
-
Hi,
Hope someone can help..
I have 4 x /24 Public IP blocks (1024 addresses) which I have bound to pfsense as virtual server type any.
I need to add a large number of SNAT rules to map a large number of SMTP servers to outbound public IPs, is there a way to add rules by script / command line?
-
To map whole subnets should be possible in pfSense outbound NAT.
You can add a rule for a source subnet and at Translation select "Other subnet" from the bottom of the dropdown and enter your public subnet below.
Maybe you also need to select "Bitmask" from the pool options.If you need special mappings defined in a translation table, there will also be a way to script it.
Go to Diagnostics > Backup & Restore, select NAT at "backup area" and download the XML file. Open the file in a text editor and take a look at the rules to get an idea how they are constructed.
This way you may build up your additional rules and insert them in the XML in the <outbound>section and import the file after in Diagnostics > Backup & Restore.</outbound>
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