Table: net_connection
Test network connectivity to using a network protocol (e.g. TCP) and address / port (e.g. steampipe.io:443).
Note: An address
must be provided in all queries to this table.
Examples
Test a TCP connection (the default protocol) to steampipe.io on port 443
select *from net_connectionwhere address = 'steampipe.io:443';
Test if SSH is open on server 68.183.153.44
select *from net_connectionwhere address = '68.183.153.44:ssh';
Test a UDP connection to DNS server 1.1.1.1 on port 53
select *from net_connectionwhere protocol = 'udp' and address = '1.1.1.1:53';
Test if RDP is open on server 65.2.9.152
select *from net_connectionwhere protocol = 'tcp' and address = '65.2.9.152:3389';
.inspect net_connection
Test network connectivity to an address.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
address | text | Address to connect to, as specified in https://golang.org/pkg/net/#Dial. |
connected | boolean | True if the connection was successful. |
error | text | Error message if the connection failed. |
local_address | text | Local address (ip:port) for the successful connection. |
protocol | text | Protocol type: tcp, tcp4 (IPv4-only), tcp6 (IPv6-only), udp, udp4 (IPv4-only), udp6 (IPv6-only), ip, ip4 (IPv4-only), ip6 (IPv6-only), unix, unixgram or unixpacket. |
remote_address | text | Remote address (ip:port) for the successful connection. |