Forum Discussion
F5-FW-Struggler
Nimbostratus
May 12, 2014How to Scipt SNAT Automap for 100's of Virtual Servers
We are changing our topology for F5 and routing.
VIPs we have today facing the internet are load balancing to DMZ and inside vlans.
With our topology change, we need to turn on SNATTing (automap) fo...
Sec-Enabled_658
Cirrostratus
May 12, 2014I would use a bash script to modify all the vips you want to enable automap for. Just set the "VIPS" variable with a spaced list of the virtual names
Would look something like this:
!/bin/bash
VIPS="vs_app1 vs_app2 vs_app3"
for VIP in $VIPS ; do
tmsh modify ltm virtual $VIP source-address-translation { type automap }
done exit 0
F5-FW-Struggler
Nimbostratus
May 12, 2014Thanks Nathan, that is extremely useful info.. I am sure i would like to go this route... however, just one more question:
Is what i am typing (in "quotations" the correct syntax?)
Type "!/bin/bash" at the bigpipe mode once I ssh into the F5
Type "VIPS="vs_app1 vs_app2 vs_app3 ...... vs_app150""
Type "for VIP in $VIPS ; do tmsh modify ltm virtual $VIP source-address-translation { type automap }"
Type "exit"
Would that work?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects