mikrotikvoip:mikrotik_voip_script
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| mikrotikvoip:mikrotik_voip_script [2019/04/27 12:17] – ghusson | mikrotikvoip:mikrotik_voip_script [2019/04/27 12:27] (Version actuelle) – ghusson | ||
|---|---|---|---|
| Ligne 11: | Ligne 11: | ||
| # shoud be # | # shoud be # | ||
| ######################################################################## | ######################################################################## | ||
| - | |||
| - | |||
| - | # Initialise variables | ||
| - | :global internalIp; | ||
| - | :global internalInterface; | ||
| - | :global externalIp; | ||
| - | :global externalInterface; | ||
| - | :global voipHttpsPort; | ||
| - | :global voipHttpPort; | ||
| - | :global voipSIPPort; | ||
| - | :global voipSIPsPort; | ||
| - | :global voipTunnelPort; | ||
| - | :global voipMediaPort; | ||
| - | :global initialNatRulesPosition; | ||
| # Set variables (change them !!!!) | # Set variables (change them !!!!) | ||
| - | :set internalIp " | + | :global |
| - | :set internalInterface " | + | :global |
| - | :set externalIp " | + | :global |
| - | :set externalInterface " | + | :global |
| - | :set voipHttpsPort 443; | + | :global |
| - | :set voipHttpPort 80; | + | :global |
| - | :set voipSIPPort 5060; | + | :global |
| - | :set voipSIPsPort ($voipSIPPort + 1); | + | :global |
| - | :set voipTunnelPort 5090; | + | :global |
| - | :set voipMediaPort " | + | :global |
| - | :set initialNatRulesPosition 0; | + | :global |
| # Clean previously defined rules | # Clean previously defined rules | ||
| Ligne 118: | Ligne 104: | ||
| # Add drop rule for IP that have been added to " | # Add drop rule for IP that have been added to " | ||
| # address list | # address list | ||
| - | add action=drop \ | + | /ip firewall filter |
| chain=forward \ | chain=forward \ | ||
| - | src-address-list=blacklist-sip | + | src-address-list=blacklist-sip |
| - | comment=" | + | comment=" |
| # Add drop rule for IP that have been added to " | # Add drop rule for IP that have been added to " | ||
| # address list | # address list | ||
| - | add action=drop \ | + | /ip firewall filter |
| chain=forward \ | chain=forward \ | ||
| - | src-address-list=blacklist-3cxtunnel | + | src-address-list=blacklist-3cxtunnel |
| - | comment=" | + | comment=" |
| # Add an IP to " | # Add an IP to " | ||
| # number (max 10 SIP sessions per IP) and packet rate (max 100 packets | # number (max 10 SIP sessions per IP) and packet rate (max 100 packets | ||
| # in 1mn) - adapt it to your field use. | # in 1mn) - adapt it to your field use. | ||
| - | add action=add-src-to-address-list \ | + | /ip firewall filter |
| chain=forward \ | chain=forward \ | ||
| - | protocol=udp | + | protocol=udp |
| dst-port=5060 \ | dst-port=5060 \ | ||
| connection-limit=10, | connection-limit=10, | ||
| connection-state=invalid, | connection-state=invalid, | ||
| limit=100/ | limit=100/ | ||
| - | address-list=blacklist-sip | + | address-list=blacklist-sip |
| address-list-timeout=3h \ | address-list-timeout=3h \ | ||
| log=yes \ | log=yes \ | ||
| log-prefix=hacker-sip \ | log-prefix=hacker-sip \ | ||
| - | comment=" | + | comment=" |
| # Add an IP to " | # Add an IP to " | ||
| # rate (max 4 tunnels per IP) - adapt it to your field use. | # rate (max 4 tunnels per IP) - adapt it to your field use. | ||
| - | add action=add-src-to-address-list \ | + | /ip firewall filter |
| chain=forward \ | chain=forward \ | ||
| - | protocol=udp | + | protocol=udp |
| dst-port=5060 \ | dst-port=5060 \ | ||
| connection-limit=4, | connection-limit=4, | ||
| connection-state=invalid, | connection-state=invalid, | ||
| - | address-list=blacklist-3cxtunnel | + | address-list=blacklist-3cxtunnel |
| address-list-timeout=3h \ | address-list-timeout=3h \ | ||
| log=yes \ | log=yes \ | ||
| log-prefix=hacker-3cxtnl \ | log-prefix=hacker-3cxtnl \ | ||
| - | comment=" | + | comment=" |
| # Reference documentation for connection-limit and limit: | # Reference documentation for connection-limit and limit: | ||
mikrotikvoip/mikrotik_voip_script.1556367447.txt.gz · Dernière modification : 2019/04/27 12:17 de ghusson