dastiw1
@dastiw1
Frontend Developer

Сайт не открывает извне, порт 80. Сервер apach2+nginx (VestaCP) В каком направлении копать?

Сайт не открывает извне (порт 80).
Все началось после:
Пытался запустить nodejs-express и добавил порт 3000 в список разрешенных и переадресацию порта 3000 на 80 ( Но потом я переадресацию убрал ).
Работал так себе и радовался phantomjs-у и вдруг вижу что сайт через порт 80 не открывается.
Порты личного кабинета и mysql работают.
iptables --list:
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             multiport dports http,https
ACCEPT     tcp  --  anywhere             anywhere             multiport dports ftp,12000:12100
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             multiport dports smtp,ssmtp,submission,2525
ACCEPT     tcp  --  anywhere             anywhere             multiport dports pop3,pop3s
ACCEPT     tcp  --  anywhere             anywhere             multiport dports imap2,imaps
ACCEPT     tcp  --  anywhere             anywhere             multiport dports mysql,postgresql
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8083
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  debian               anywhere
ACCEPT     all  --  localhost            anywhere
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ftp-data
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ftp
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:smtp
ACCEPT     udp  --  anywhere             anywhere             udp spt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:pop3
ACCEPT     udp  --  anywhere             anywhere             udp spt:ntp
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:imap2
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:mysql
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:postgresql
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:http-alt
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:8433
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:8083
ACCEPT     tcp  --  anywhere             anywhere             tcp spts:12000:12100
ACCEPT     tcp  --  anywhere             anywhere             state RELATED,ESTABLISHED

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain fail2ban-MAIL (0 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Chain fail2ban-SSH (0 references)
target     prot opt source               destination
REJECT     all  --  12.237.115.7         anywhere             reject-with icmp-port-unreachable
RETURN     all  --  anywhere             anywhere

Chain fail2ban-VESTA (0 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Chain fail2ban-ssh (0 references)
target     prot opt source               destination
DROP       all  --  12.237.115.7         anywhere
RETURN     all  --  anywhere             anywhere

Chain vesta (0 references)
target     prot opt source               destination
  • Вопрос задан
  • 1572 просмотра
Решения вопроса 1
@azazelpw
Linux SA
Chain INPUT (policy DROP)
У вас по моему пакеты дропаются :)
напишите
iptables -S увидите правило
потом напишите
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
И у вас откроется 80 порт.
Ответ написан
Пригласить эксперта
Ответы на вопрос 2
@ShamblerR
А собственно можно конфиг nginx получить ? Есть вообще нормальный такой вариант что он в принципе у вас слушает lo
Ответ написан
Комментировать
dastiw1
@dastiw1 Автор вопроса
Frontend Developer
Благодарю Азазель, iptables --policy INPUT ACCEPT помогло. Теперь надо решить проблему с nginx. Но это уже другое, я с таким уже сталкивался
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы