ANTA catalog for STUN tests
VerifyStunClient ¶
Verifies the configuration of the STUN client, specifically the IPv4 source address and port.
Optionally, it can also verify the public address and port.
Expected Results
- Success: The test will pass if the STUN client is correctly configured with the specified IPv4 source address/port and public address/port.
- Failure: The test will fail if the STUN client is not configured or if the IPv4 source address, public address, or port details are incorrect.
Examples
anta.tests.stun:
- VerifyStunClient:
stun_clients:
- source_address: 172.18.3.2
public_address: 172.18.3.21
source_port: 4500
public_port: 6006
- source_address: 100.64.3.2
public_address: 100.64.3.21
source_port: 4500
public_port: 6006
Inputs¶
Name | Type | Description | Default |
---|
ClientAddress¶
Name | Type | Description | Default |
---|---|---|---|
source_address |
IPv4Address
|
IPv4 source address of STUN client.
|
- |
source_port |
Port
|
Source port number for STUN client.
|
4500
|
public_address |
IPv4Address | None
|
Optional IPv4 public address of STUN client.
|
None
|
public_port |
Port | None
|
Optional public port number for STUN client.
|
None
|
Source code in anta/tests/stun.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
VerifyStunServer ¶
Verifies the STUN server status is enabled and running.
Expected Results
- Success: The test will pass if the STUN server status is enabled and running.
- Failure: The test will fail if the STUN server is disabled or not running.
Examples
anta.tests.stun:
- VerifyStunServer:
Source code in anta/tests/stun.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|