Так найдите правило в /etc/net/fw и поменяйте одну цифорку
/etc/net/ fw не было
Нашёл /etc/net/ifaces/default/fw/iptables/filter/INPUT
Остальные файлы INPUT пустые
cat даёт
# This file was automatically created by alterator-net-iptables.
# If you are using alterator-net-iptables then all changes
# made in this file by hands will be lost!
# For more information see alterator-net-iptables(1).
-P ACCEPT
-f -j DROP
-m state --state ESTABLISHED,RELATED -j ACCEPT
-j ULOG --ulog-nlgroup 1 --ulog-cprange 48 --ulog-qthreshold 50 --ulog-prefix "icount"
-i breth0 -p tcp --dport 8080 -j ACCEPT
-i breth0 -p udp --dport 1194 -j ACCEPT
-i breth0 -p tcp --dport 1194 -j ACCEPT
-i breth0 -p tcp --dport 22 -j ACCEPT
-i breth0 -p udp --dport 22 -j ACCEPT
-i breth0 -p icmp -j ACCEPT
-i breth0 -j DROP
Сначала не заметил надпись про запись руками, поправил руками 8080 на 8082
Не помогло. (
Делал рестарт сервиса и ребут, изменения сохраняются, зайти не могу.
останавливаю iptables - получается зайти.
Заново запускаю - не пускает, сохраняю, ребутаю - безполезног.
В игоге имеем:
При запущенных iptables
в WebUI Настройки - Веб-интерфейс- Порт 8082 + в правилах руками правлю в файле INPUT на 8082 - не заходит
меняю и то и другое на 8080 - заходит. Меняю что-то одно на 8082 - естественно, не заходит.
alterator-net-iptables пока не изучал. Надо разбираться в его мане или всё же косяк не во мне?
Заметил следущее. Если изменить всё на 8082 и перезагрузить, то всё будет работать. но если перезапустить iptables, то снова не получается зайти.
service iptables status говорит
Table: mangle
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Table: filter
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -f anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ULOG all -- anywhere anywhere ULOG copy_range 48 nlgroup 1 prefix `icount' queue_threshold 50
ACCEPT tcp -- anywhere anywhere tcp dpt:8082
ACCEPT udp -- anywhere anywhere udp dpt:openvpn
ACCEPT tcp -- anywhere anywhere tcp dpt:openvpn
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT udp -- anywhere anywhere udp dpt:ssh
ACCEPT icmp -- anywhere anywhere
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DROP all -f anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ULOG all -- anywhere anywhere ULOG copy_range 48 nlgroup 1 prefix `fcount' queue_threshold 50
ACCEPT all -- anywhere 192.168.0.0/24
ACCEPT all -- anywhere anywhere PHYSDEV match --physdev-is-bridged
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DROP all -f anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ULOG all -- anywhere anywhere ULOG copy_range 48 nlgroup 1 prefix `ocount' queue_threshold 50
При этом тут же
# iptables -nvL
Chain INPUT (policy ACCEPT 8 packets, 514 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -f * * 0.0.0.0/0 0.0.0.0/0
86 5404 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
240 21268 ULOG all -- * * 0.0.0.0/0 0.0.0.0/0 ULOG copy_range 48 nlgroup 1 prefix `icount' queue_threshold 50
0 0 ACCEPT tcp -- breth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
0 0 ACCEPT udp -- breth0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:1194
0 0 ACCEPT tcp -- breth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1194
0 0 ACCEPT tcp -- breth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT udp -- breth0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:22
0 0 ACCEPT icmp -- breth0 * 0.0.0.0/0 0.0.0.0/0
232 20754 DROP all -- breth0 * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -f * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ULOG all -- * * 0.0.0.0/0 0.0.0.0/0 ULOG copy_range 48 nlgroup 1 prefix `fcount' queue_threshold 50
0 0 ACCEPT all -- breth0 * 0.0.0.0/0 192.168.0.0/24
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 PHYSDEV match --physdev-is-bridged
0 0 ACCEPT all -- breth0 * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 DROP all -- breth0 * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 10 packets, 1041 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -f * * 0.0.0.0/0 0.0.0.0/0
62 5020 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
10 1041 ULOG all -- * * 0.0.0.0/0 0.0.0.0/0 ULOG copy_range 48 nlgroup 1 prefix `ocount' queue_threshold 50
Теперь вообще ничего не понимаю... Не заходит. Видимо, надо копать в торону alterator-net-iptables