Я искал эту проблему, но еще не нашел решение.
У меня есть Ubuntu 16.04 и установлен iptables-persistent для загрузки сохраненных правил при запуске.
] К сожалению, это не загрузка изменений. Есть ли файл журнала, где я могу видеть ошибки?
Исходный iptable был создан во время установки, но мне нужно добавить дополнительное правило.
Я добавил следующую строку в iptables
ACCEPT tcp -- 192.168.99.0/24 anywhere tcp dpt:28778
Конечный результат должен быть таким, но после перезапуска всегда отсутствует дополнительное правило.
Chain INPUT (policy DROP)
target prot opt source destination
f2b-sogo tcp -- anywhere anywhere multiport dports http,https,smtp,submission,pop3,pop3s,imap2,imaps,sieve
f2b-postfix tcp -- anywhere anywhere multiport dports http,https,smtp,submission,pop3,pop3s,imap2,imaps,sieve
f2b-dovecot tcp -- anywhere anywhere multiport dports http,https,smtp,submission,pop3,pop3s,imap2,imaps,sieve
f2b-postfix tcp -- anywhere anywhere multiport dports http,https,smtp,submission,pop3,pop3s,imap2,imaps,sieve
f2b-nginx tcp -- anywhere anywhere multiport dports http,https,smtp,submission,pop3,pop3s,imap2,imaps,sieve
f2b-sshd-ddos tcp -- anywhere anywhere multiport dports ssh
f2b-sshd tcp -- anywhere anywhere multiport dports ssh
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:imap2
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
ACCEPT tcp -- 192.168.99.0/24 anywhere tcp dpt:28778
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain f2b-dovecot (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain f2b-nginx (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain f2b-postfix (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain f2b-sogo (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain f2b-sshd (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain f2b-sshd-ddos (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Когда я использую iptables-restore & lt; /etc/iptables/rules.v4 применяются параметры, поэтому я ожидал, что он должен загрузиться при запуске.
Кто-нибудь знает, что я делаю неправильно здесь?
// Эдвин