Compare Pastes
Differences between the pastes
#120790 (25.04.2019 15:53)
and
#222426 (24.09.2021 11:04).
1 | 13 () as ResultSms = SendSMS(Token) { | |
2 | 12 param | |
3 | 11 message: "Hi from SPL!)"; | |
4 | 10 channelName: "SMS"; | |
5 | 9 contact: "87471377154"; | |
6 | 8 resource: $sendUrl; | |
7 | 7 //access_token: Token.access_token; | |
8 | 6 //token_type: Token.token_type; | |
9 | 5 } | |
10 | 4 } | |
11 | 3 | |
12 | 2 composite SendSMS(input IN) { | |
13 | 1 param | |
14 | 0 expression | |
15 | 1 expression | |
16 | 2 expression | |
17 | 3 expression | |
18 | 4 //expression | |
19 | 5 //expression | |
20 | 6 type | |
21 | 7 SMS = tuple | |
22 | 8 graph | |
23 | 9 (stream | |
24 | 10 { | |
25 | 11 param | |
26 | 12 url : $resource; | |
27 | // CDISP0302E ERROR: A value name is expected, but the IN identifier is not a value in this scope. | |
28 | 13 extraHeaders : "Authorization: " + IN.token_type + " " + IN.access_token; | |
29 | 14 | |
1 | #!/bin/bash | |
2 | ||
3 | #INET_IFACE="eth0" # здесь имя инетовского интерфейса | |
4 | LAN_IP="10.0.0.10" | |
5 | LAN_IP_RANGE="10.0.0.0/24" | |
6 | LAN_IFACE="eth1" # интерефейс локальной сети | |
7 | LO_IFACE="lo" | |
8 | LO_IP="127.0.0.1" | |
9 | ||
10 | # Очистка всех цепочек iptables | |
11 | iptables -F | |
12 | iptables -X | |
13 | iptables -Z | |
14 | # Политики для трафика, не соответствующего ни одному правилу | |
15 | iptables -P INPUT DROP | |
16 | iptables -P FORWARD DROP | |
17 | iptables -P OUTPUT ACCEPT | |
18 | # Разрешаем Ping | |
19 | iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT | |
20 | iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT | |
21 | iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT | |
22 | iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT | |
23 | # Прочие настройки | |
24 | iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
25 | iptables -A INPUT -i lo -j ACCEPT | |
26 | iptables -A INPUT -p icmp --icmp-type 3 -j ACCEPT | |
27 | iptables -A INPUT -p icmp --icmp-type 11 -j ACCEPT | |
28 | iptables -A INPUT -p icmp --icmp-type 12 -j ACCEPT | |
29 | iptables -A INPUT -p tcp --syn --dport 113 -j REJECT --reject-with tcp-reset | |
30 | # Доступ по ssh | |
31 | iptables -A INPUT -p TCP --dport 22 -j ACCEPT | |
32 | # dhcp | |
33 | iptables -I INPUT -i $LAN_IFACE -p udp --dport 67:68 --sport 67:68 -j ACCEPT | |
34 | iptables -A INPUT -s $LAN_IP_RANGE -p udp -m udp --dport 67 -j ACCEPT | |
35 | # Доступ dns | |
36 | iptables -A INPUT -p udp --dport 53 -j ACCEPT | |
37 | iptables -A INPUT -p tcp --dport 53 -j ACCEPT | |
38 | # Доступ tftp | |
39 | iptables -A INPUT -p udp --dport tftp -j ACCEPT | |
40 | iptables -A INPUT -p tcp --dport tftp -j ACCEPT | |
41 | # Доступ к webserver по http и https | |
42 | iptables -A INPUT -p TCP --dport 80 -j ACCEPT | |
43 | iptables -A INPUT -p TCP --dport 443 -j ACCEPT | |
44 | #Сохраняем правила | |
45 | # Calculate/Gentoo хранит в /var/lib/iptables/rules-save |