Tag Link | [DNS_Lookup] | Category | Utility |
---|---|---|---|
Type | Substitution | Source Available | Yes |
Support | Preferred | Version | 8.5 |
Change | New | Data Source | Any |
Output Type | String or DNS_Response | Security | None |
Implementation | LassoScript | Sets | Lasso 8.5 |
[DNS_Lookup] performs a DNS query and returns the results in one of several formats. The tag requires a single parameter which specifies the host name or IP address that should be looked up.
If a host name is specified then the result of the tag is a preformatted string that provides all of the available DNS information for the host. If an IP address is specified then the result is an array which contains the reverse lookup host name for the address.
The
The full list of supported types include *, A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL, WKS, PTR, HINFO, MINFO, MX, TXT. If an unsupported type is required it can be specified as an integer from 0 to 255. Other parameters include
By default the tag returns an array of values if a
The query which is being performed can also be inspected. The following parameters cause the [DNS_Lookup] tag to return information about what query it will perform, but the query is not actually performed.
Note: Lasso's DNS tags only support DNS hosts which communicate through TCP. The DNS host built into some DSL/Cable modem gateways only support UDP communications and cannot be used through Lasso. In order to use the DNS tags (and the MX lookup feature for direct sending of SMTP email) it may be necessary to specify a valid DNS host either in the system network preferences or in the Setup > Site > Lasso Settings section of Lasso Stie Administration.
[DNS_Lookup: 'www.example.com']
[DNS_Lookup: 'www.example.com',
[DNS_Lookup: 'www.example.com',
[DNS_Lookup: '127.0.0.1']
[DNS_Lookup: 'www.example.com',
[DNS_Lookup: 'www.example.com',
Required Parameters | |
---|---|
Host Name | The host name to lookup or the IP address for reverse lookups. |
Optional Parameters | |
-Type | The type of lookup to be performed. Defaults to *, returning all available information for host names and to a reverse lookup for IP addresses. See the description for a full list of possible values. |
-Class | The class of the lookup, usually not necessary to change from the default. |
-NoRecurse | If set then the DNS query will only return the data from the local DNS server. This can be useful for checking the DNS cache without causing a recursive lookup. |
-Inverse | If set then an inverse lookup is performed. |
-Status | If set then a status lookup is performed. |
-Format | If set then the tag returns the output from the DNS server formatted in a human readable format. |
-BitFormat | If set then the tag returns the low |
-ShowResponse | If set then the [DNS_Response] object is returned. |
-FormatQuery | If set then the DNS lookup is not performed, but the query is simply returned in human readable format. |
-BitQuery | If set then the DNS lookup is not performed, but the query is returned in low |
-ShowQuery | If set then the DNS lookup is not performed, but the [DNS_Response] object for the query is returned. |
See the Lasso 8 Language Guide for examples of how to use this tag.