DrayTek UK Users' Community Forum

Help, Advice and Solutions from DrayTek Users

2862 adding multiple IP's

  • piste basher
  • Topic Author
  • Away
  • Big Contributor
  • Big Contributor
More
04 Apr 2022 16:00 #100921 by piste basher
Re: 2862 adding multiple IP's was created by piste basher
Don't know if it will help but on my 2927ax under Objects Setting there is an option to "Download the default CSV template to edit"

Please Log in or Create an account to join the conversation.

More
04 Apr 2022 17:01 #100922 by desquinn
Replied by desquinn on topic Re: 2862 adding multiple IP's
telnet / ssh cmd line may be your friend here. Not used it for this but seems simple enough. 3 commands below which create the object, add an IP to it and then check it is there.

Code:
> object ip obj 1 -n marketing > object ip obj 1 -a 1 192.168.1.45 > object ip obj 1 -v IP Object Profile 1 Name :[marketing] Interface:[Any] Address type:[single] Start ip address:[192.168.1.45] End/Mask ip address:[0.0.0.0] Invert Selection:[0]


Or do this
Code:
object ip obj 31 -n test2 -a 1 192.168.1.99 object ip obj 32 -n test3 -a 1 192.168.1.100


the group them and use them. The above two commands could be concatenated in excel to create a copy and paste command line that will do it quicker than gui.

Des Quinn

Please Log in or Create an account to join the conversation.

More
04 Apr 2022 17:24 #100924 by hornbyp
Replied by hornbyp on topic Re: 2862 adding multiple IP's
I would agree that the use of 'objects' is probably the way to go.

They can be prepared offline in a simple CSV file (the "download default template" option appears to download an empty file, with just headers). The use of the Telnet interface would presumably involve the preparation of an offline script, so there's no obvious advantage over preparing an offline .CSV file that can just be directly imported.

There are some caveats though:

The 'firewall' rules don't allow vast numbers of objects to be specified - but they do allow 'groups' (which contain objects). At least on my 2860n, there are restrictions on how many objects can appear in a group (12?), so multiple groups will be needed. There is a limit on how many groups can be specified in a Firewall Rule (2?), so multiple Firewall Rules may be required!

There doesn't seem to be a way of automatically creating (or restoring from file), the 'group' definitions, so they will need setting up in the GUI.

[Restrictions mentioned are as seen in my olde-worlde 2860n ... they may be relaxed in later models]

This is a sample .CSV file containing object definitions (of single (LAN) IP addresses)
Code:
Index,Name,"Interface (0:ANY 1:LAN/DMZ/RT/VPN 3:WAN, please enter the digit)","Address Type (0:Subnet Address 1:Single Address 2:Any Address 3:Range Address 4:Mac Address, please enter the digit)",MAC Address (11:22:33:44:55:66),Start IP Address (192 .168.1.1),End IP Address (192.168.254.254),Subnet Mask (255.255.255.255),Inversion Selection (Not Input:Disable 1:Enable) 1,Thor,1,1,00:00:00:00:00:00,192.168.1.249,0.0.0.0,,0 2,Odin,1,1,00:00:00:00:00:00,192.168.1.8,0.0.0.0,,0 3,Wodin,1,1,00:00:00:00:00:00,192.168.1.252,0.0.0.0,,0 4,Frigg,1,1,00:00:00:00:00:00,192.168.1.253,0.0.0.0,,0

Please Log in or Create an account to join the conversation.

More
04 Apr 2022 17:40 #100927 by desquinn
Replied by desquinn on topic Re: 2862 adding multiple IP's
sorry was in router cmd line mode dealing with other things :) template import and export would be easier and in later models it does support exporting and importing groups. 286x at least. And it is 12 onjects to a group still.

Des Quinn

Please Log in or Create an account to join the conversation.

More
06 Apr 2022 02:02 #100949 by hornbyp
Replied by hornbyp on topic Re: 2862 adding multiple IP's

keat63 wrote:
Anyhow, I tried to import the IP's as objects this morning (there are actually 82 of them), but each time I run the restore, I just get a 'failed (#4)' message.


Maybe create a single object (on the Router), export it and prove it re-imports? I'm assuming there was a syntax error in your original file ....

Please Log in or Create an account to join the conversation.

More
07 Apr 2022 13:54 #100955 by hornbyp
Replied by hornbyp on topic Re: 2862 adding multiple IP's
Would appear to be a bug with the 2862 then - one for Draytek support.

(I just tried it on my 2860n; all 192 objects exported and restored correctly - I deleted one or two entries, before the restore, just to prove it was doing something useful)

Please Log in or Create an account to join the conversation.

Moderators: Sami