Rolzzandik
Участник
- Сообщения
- 492
- Реакции
- 234
Всем привет! Нуждаюсь в вашей помощи, уже кукуха едет от IPTABLES.
В чем мем? Все правила работают отлично, но с одним исключением.
Сейчас стоят такие правила iptables и к серверу можно подключиться, и он показывается в мониторинге csgo:
Но в sb/lk он не показывается:
sb_debug_connection:
В чем может быть проблема?
Rules:
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -t nat -X
iptables -t mangle -X
//Затираю все правила(тк проверяю)
iptables -P INPUT DROP
iptables -A INPUT -p tcp --dport 80 -j ACCEPT //http
iptables -A INPUT -p tcp --dport 443 -j ACCEPT //https
iptables -A INPUT -p udp --dport 80 -j ACCEPT //http
iptables -A INPUT -p udp --dport 443 -j ACCEPT //https
iptables -A INPUT -p tcp --dport 22 -j ACCEPT //ssh
iptables -A INPUT -p udp --dport 22 -j ACCEPT //ssh
iptables -A INPUT -p tcp --dport 64926 -j ACCEPT //wireguard vpn
iptables -A INPUT -p udp --dport 64926 -j ACCEPT //wireguard vpn
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT //mysql
iptables -A INPUT -p udp --dport 3306 -j ACCEPT //mysql
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT //ping
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT //ping
iptables -A INPUT -p udp --dport 27014 -m hashlimit --hashlimit 100/s --hashlimit-burst 100 --hashlimit-mode srcip --hashlimit-name arena -j ACCEPT
iptables -A INPUT -p udp --dport 27014 -j DROP //хешлимит 1 сервер
iptables -A INPUT -p udp --dport 27015 -m hashlimit --hashlimit 100/s --hashlimit-burst 100 --hashlimit-mode srcip --hashlimit-name mmhvh -j ACCEPT
iptables -A INPUT -p udp --dport 27015 -j DROP //хешлимит 2 сервер
iptables -A INPUT -p udp --dport 27016 -m hashlimit --hashlimit 100/s --hashlimit-burst 100 --hashlimit-mode srcip --hashlimit-name dmhvh -j ACCEPT
iptables -A INPUT -p udp --dport 27016 -j DROP //хешлимит 3 сервер
iptables -A INPUT -p udp --dport 27017 -m hashlimit --hashlimit 100/s --hashlimit-burst 100 --hashlimit-mode srcip --hashlimit-name legacy -j ACCEPT
iptables -A INPUT -p udp --dport 27017 -j DROP //хешлимит 4 сервер
iptables -t nat -A POSTROUTING -s 10.141.236.0/24 -o ens3 -j SNAT --to-source 95.214.10.171 //трансляция подсети на реальный ip
iptables -t nat -A POSTROUTING -s 10.141.236.0/24 -j MASQUERADE //транслитерация подсети
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p udp -m udp --dport 27015 -j DNAT --to-destination 10.141.236.10:27015 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p tcp -m tcp --dport 27015 -j DNAT --to-destination 10.141.236.10:27015 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p udp -m udp --dport 27014 -j DNAT --to-destination 10.141.236.10:27014 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p tcp -m tcp --dport 27014 -j DNAT --to-destination 10.141.236.10:27014 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p udp -m udp --dport 27016 -j DNAT --to-destination 10.141.236.10:27016 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p tcp -m tcp --dport 27016 -j DNAT --to-destination 10.141.236.10:27016 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p udp -m udp --dport 40819 -j DNAT --to-destination 10.141.236.10:3389 //переадресация порта (rdp)
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p tcp -m tcp --dport 40819 -j DNAT --to-destination 10.141.236.10:3389 //переадресация порта (rdp)
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p udp -m udp --dport 27017 -j DNAT --to-destination 10.141.236.11:27017 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p tcp -m tcp --dport 27017 -j DNAT --to-destination 10.141.236.11:27017 //переадресация порта
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p tcp -m tcp --dport 222 -j DNAT --to-destination 10.141.236.11:22 //переадресация порта (ssh)
iptables -t nat -A PREROUTING -d 95.214.10.171/32 -i ens3 -p udp -m udp --dport 222 -j DNAT --to-destination 10.141.236.11:22 //переадресация порта (ssh)
В чем мем? Все правила работают отлично, но с одним исключением.
Сейчас стоят такие правила iptables и к серверу можно подключиться, и он показывается в мониторинге csgo:
Но в sb/lk он не показывается:
sb_debug_connection:
В чем может быть проблема?