Import large number of Aliases/NAT to pfsense
-
https://www.netgate.com/docs/pfsense/firewall/aliases.html RTFM.
-
Thanks for the reply...
Using bulk import option i can only create single alias with number of hosts... but in my case,i have to create number of aliases with different IPs -
What exactly are you trying to do?
So you have 500 hosts and you want to change their outbound nats? Why would you not just use 1:1 natting?
https://www.netgate.com/docs/pfsense/nat/1-1-nat.html
Outgoing traffic to the Internet from the specified internal IP will originate from the associated external IP. -
I can't do 1:1 NAT in my requirement because i need to NAT 4 internal IPs to a single public IP. So idecided to create an alias for 4 internal IPs and did outbound NAT. Similarly i need to do the same for 500 hosts.
-
@thoufiq said in Import large number of Aliases/NAT to pfsense:
i need to NAT 4 internal IPs to a single public IP
That is how pfsense works out of the box... So you have 500 hosts and you need to nat 1-4 to publicIPA, and then say 5-8 to publicIPB? etc..
Why exactly? Not understanding the scenario - happy to help once I understand what exactly you want to do such a thing, etc.
-
In this scenario the 4 hosts serve the same purpose. Since the 4 hosts are used for same purpose i decided to create outbound NAT with a single public IP to reduce the publice IP usage.Lets consider the private IPs 10.1.1.2/3/4/5 NAT by a public IP 'w.x.y.z' and if the 10.1.1.2 fails the other three hosts still communicate with internet by the same public IP.
By the way this is not the issue. It will be helpful if we can create the NAT or alias using excel/Notepad and import the excel or notepad file to pfsense to create large number of Alias/Rules/ NAT. or is there any way to create it via shell. -
I still do not understand the issue here. Looks like a simple loadbalancing config? Which doesn't explain the need for aliases or outbound nats.. I am clearly missing some piece of the puzzle here.
But if you want to create these without going through the gui.. Should be simple enough to manipulate the XML and load it in.
Just grab the alias and nat sections. Edit them to your liking and then restore.. There are plenty of places that will parse a text file or csv, etc. and put it into xml format for you with all the labels needed sort of thing.
-
Thanks for the suggestion..We have created aliases to identify which internals IPs(group) are mapped to which external IP.
-
CAn you please explain about """"There are plenty of places that will parse a text file or csv, etc. and put it into xml format for you with all the labels needed sort of thing.""""
-
@johnpoz I think outbound NAT is the best option where we want to map group of Internal IPs to an external IP
-
example
http://www.convertcsv.com/csv-to-xml.htmThere was a thread just the other day that had like 3 of them listed
Once you have a couple done - you will be able to determine the formatting in the xml for other ones.
-
Thank you so much.. Let me try this ...