How can I import an IP List into a USG310 via shell script
I created a Python script to import the IPs and format them as per what I can find out, However that's where I seems to be stuck, im unable to create a working shell script .zysh to import said IPs, any help would really be appreciated.
The Zyxel in Question is a USG310, and even though its EOL its a solid piece of kit.
Here's what i done so far:
#
!
object-group service CC2
description CommandControl IPs
address-object cc1 1.221.179.74
address-object cc2 100.10.72.114
address-object cc3 100.4.182.242
address-object cc4 102.156.115.75
address-object cc5 102.156.192.103
address-object cc6 102.156.234.92
address-object cc7 102.156.6.123
address-object cc8 102.157.165.228
address-object cc9 102.159.177.74
address-object cc10 102.159.81.188
…
address-object cc486 98.147.155.235
address-object cc487 98.163.227.79
address-object cc488 98.187.21.2
address-object cc489 98.4.43.111
!
Any help greatly appreciated.
Best Answers
-
Hi @cfts_ea,
Enter the following commands in a file and save it as zysh. Then upload the zysh file to USG310 and apply it.
configure terminal
address-object cc1 1.221.179.74
address-object cc2 100.10.72.114
address-object cc3 100.4.182.242
address-object cc4 102.156.115.75
address-object cc5 102.156.192.103
address-object cc6 102.156.234.92
address-object cc7 102.156.6.123
address-object cc8 102.157.165.228
address-object cc9 102.159.177.74
address-object cc10 102.159.81.188…
address-object cc486 98.147.155.235
address-object cc487 98.163.227.79
address-object cc488 98.187.21.2
address-object cc489 98.4.43.111
write0 -
Hi @cfts_ea,
configure terminal
object-group address CC2
address-object cc1
address-object cc2
...
address-object cc128
exit
writeNote: On USG310, the maximum address object in one address group is 128.
0
All Replies
-
Hi @cfts_ea,
Enter the following commands in a file and save it as zysh. Then upload the zysh file to USG310 and apply it.
configure terminal
address-object cc1 1.221.179.74
address-object cc2 100.10.72.114
address-object cc3 100.4.182.242
address-object cc4 102.156.115.75
address-object cc5 102.156.192.103
address-object cc6 102.156.234.92
address-object cc7 102.156.6.123
address-object cc8 102.157.165.228
address-object cc9 102.159.177.74
address-object cc10 102.159.81.188…
address-object cc486 98.147.155.235
address-object cc487 98.163.227.79
address-object cc488 98.187.21.2
address-object cc489 98.4.43.111
write0 -
Thanks Emily, your a star. :)
One question, is the a way to add the above to a object group 'CC2'?0 -
Hi @cfts_ea,
configure terminal
object-group address CC2
address-object cc1
address-object cc2
...
address-object cc128
exit
writeNote: On USG310, the maximum address object in one address group is 128.
0 -
Thank you, all is clear now, I can now implement my own blocks list with reasonable ease, i looks at how to automate the updates later.
0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 144 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 237 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.3K Consumer Product
- 247 Service & License
- 384 News and Release
- 83 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight