Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

If there are a large number of IPRanges to be added to an iQSonar v3 configuration it can be very time consuming to do this via the UI. The following instruction should be used to populate the database directly and SQL scripts are included.

 

Step-by-step guide

  1. Add IPAddresses to the IPRange Table

    If targeting specific IPAddresses, the StartIP and EndIP should be the same, If targeting as IPRanges, the StartIP and EndIP should be the beginning and end IPAddresses of the range.
    Note: If using Locations - a LocationID will need to be set for each row inserted, if Not using Locations, LocationID should be NULL
    Please confirm the Location Name for the IPRanges by checking Locations in your UI, or using select * from Location in your iQSonar Database and use the appropriate LocationID with the script below.

    IPRange Insert
    INSERT INTO IPRange (StartIP, EndIP, IPRangeTypeEnumID, ServiceTypeENumID, LocationID, Description) VALUES 
    	('192.168.1.1', '192.168.1.1', 
    	(SELECT IPRangeTypeEnumID FROM IPRangeTypeEnum WHERE IPRangeTypeEnum = 'Range'), 
    	(SELECT ServiceTypeEnumID FROM ServiceTypeEnum WHERE ServiceType = 'Discovery.Port'),
    	(SELECT LocationID from Location where name = 'Location Name'),
    	'Description')
  2. Update Map Table.
    After running the above SQL Script row for each IPRange you wish to add the two scripts below will need to be run and these will update the corresponding map tables.

These updates assume only one iQSonar scanning server in use, if you have more than one Scan Engine, the MapIPRange_Server script will need to be modified.

MapIPRangePortlist
INSERT INTO MapIPRangePortList (IPRangeID, PortListID)
SELECT ip.IPRangeID, pl.PortListID FROM IPRange AS ip
INNER JOIN PortList AS pl
ON pl.IsDefault = 1
WHERE IPRangeID NOT IN (SELECT IPRangeID FROM MapIPRangePortList)
MapIPRange_Server
INSERT INTO MapIPRange_Server (_ServerID, IPrangeID)
SELECT 1, IPRangeID FROM IPRange WHERE IPRangeID NOT IN (SELECT IPRangeID FROM MapIPRange_Server)

  • No labels