У меня есть сервер WSGI на порту 8080 и Nginx со следующей настройкой:
server {
location / {
proxy_pass http://localhost:8080;
}
}
когда я включаю UFW, я не могу получить доступ к своей странице в браузере
статус ufw:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
22 ALLOW IN Anywhere
80 ALLOW IN Anywhere
443 ALLOW IN Anywhere
22 (v6) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
443 (v6) ALLOW IN Anywhere (v6)
ошибка в nginx:
2015/01/25 08:13:45 [error] 26794#0: *2691 upstream timed out (110: Connection timed out) while connecting to upstream, client: x.x.x.x, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "xxx.com
Почему заблокировано соединение?
РЕДАКТИРОВАТЬ:
iptables -L -vnx
pkts bytes target prot opt in source назначение
57516 4694967 ПРИНЯТЬ tcp - * * 0.0.0.0/0 0.0.0.0/0 tcp dpt: 22 8902 1230762 ПРИНЯТЬ tcp - * * 0.0.0.0/0 0.0.0.0/0 tcp dpt: 80
Цепочка FORWARD (политика ACCEPT 0 пакетов, 0 байтов) pkts bytes target prot opt in out source destination
ЦЕПНЫЙ ВЫХОД (политика ПРИНЯТЬ 36792 пакетов, 9209532 байта) pkts bytes target prot opt in out source destination
Цепочка ufw-after-forward (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-after-input (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-after-logging-forward (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-after-logging-input (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-after-logging-output (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-after-output (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-before-forward (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-before-input (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-before-logging-forward (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-before-logging-input (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-before-logging-output (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-before-output (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-reject-forward (0 ссылок) pkts bytes target prot opt in source destination
Цепочка ufw-reject-input (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-reject-output (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-track-forward (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-track-input (0 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw-track-output (0 ссылок) pkts bytes target prot opt in out source destination
ip6tables -L -vnx
Цепочка INPUT (политика ACCEPT 0 пакетов, 0 байтов) pkts bytes target prot opt in out source destination
0 0 ufw6-before-logging-input все * * :: / 0 :: / 0
0 0 ufw6-before-input все * * :: / 0 :: / 0
0 0 ufw6-after-input все * * :: / 0 :: / 0
0 0 ufw6-after-logging-input все * * :: / 0 :: / 0
0 0 ufw6-reject-input все * * :: / 0 :: / 0
0 0 ufw6-track-input все * * :: / 0 :: / 0
Цепочка FORWARD (политика ACCEPT 0 пакетов, 0 байтов) pkts bytes target prot opt in out source destination
0 0 ufw6-before-logging-forward all * * :: / 0 :: / 0
0 0 ufw6-before-forward все * * :: / 0 :: / 0
0 0 ufw6-after-forward все * * :: / 0 :: / 0
0 0 ufw6-after-logging-forward все * * :: / 0 :: / 0
0 0 ufw6-reject-forward all * * :: / 0 :: / 0
0 0 ufw6-track-forward all * * :: / 0 :: / 0
Цепочка OUTPUT (политика ACCEPT 0 пакетов, 0 байтов) pkts bytes target prot opt in out source destination
8 536 ufw6-before-logging-output all * * :: / 0 :: / 0
8 536 ufw6-before-output all * * :: / 0 :: / 0
7 472 ufw6-after-output все * * :: / 0 :: / 0
7 472 ufw6-after-logging-output все * * :: / 0 :: / 0
7 472 ufw6-reject-output all * * :: / 0 :: / 0
7 472 ufw6-track-output all * * :: / 0 :: / 0
Цепочка ufw6-after-forward (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-after-input (1 ссылка) pkts bytes target prot opt in out source destination
Цепочка ufw6-after-logging-forward (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-after-logging-input (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-after-logging-output (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-after-output (1 ссылка) pkts bytes target prot opt in out source destination
Цепочка ufw6-before-forward (1 ссылок) pkts bytes target prot opt in source destination
Цепочка ufw6-before-input (1 ссылка) pkts bytes target prot opt in out source destination
Цепочка ufw6-before-logging-forward (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-before-logging-input (1 ссылки) pkts bytes target prot opt in out source destination
Цепочка ufw6-before-logging-output (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-before-output (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-reject-forward (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-reject-input (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-reject-output (1 ссылок) pkts bytes target prot opt in out source destination
Цепочка ufw6-track-forward (1 ссылка) pkts bytes target prot opt in out source destination
Цепочка ufw6-track-input (1 ссылка) pkts bytes target prot opt in out source destination
Цепочка ufw6-track-output (1 ссылка) pkts bytes target prot opt in out source destination
netstat -panet
Активные интернет-соединения (серверы и установленные) Proto Recv-Q Send-Q Локальный адрес Внешний адрес Состояние Inode PID пользователя / имя программы tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 0 374867 12241 / python
tcp 0 0 0.0.0.0:80 0.0.0.0:* СЛУШАТЬ 0 349464 8600 / nginx
tcp 0 0 0.0.0.0:22 0.0.0.0:* СЛУШАТЬ 0 9366 936 / sshd
tcp 0 0 0.0.0.0:5432 0.0.0.0:* СЛУШАТЬ 106 12369 1909 / postgres
tcp 0 0 x.x.x.241: 22 x.x.x.158: 56800 УСТАНОВЛЕНА 0 239804 17360/4
tcp 0 0 xxx241: 59810 xxx241: 5432 УСТАНОВЛЕНО 0 375928 12451 / sshd: root tcp 0 0 xxx241: 5432 xxx241: 59810 УСТАНОВЛЕНО 106 375929 12499 / postgres: pos tcp 0 0 127.0.0.1:5432 127.0.0.1: 46202 УСТАНОВЛЕНО 106 374933 12252 / postgres: pos tcp 0 0 xxx241: 22 xxx158: 57396 УСТАНОВЛЕНО 0 257360 21050/0
tcp 0 0 x.x.x.241: 22 x.x.x.158: 57302 УСТАНОВЛЕНА 0 255897 20759/5
tcp 0400 x.x.x.241: 22 x.x.x.158: 56594 УСТАНОВЛЕНА 0 239377 17265/3
tcp 0 0 x.x.x.241: 5432 x.x.x.241: 59811 УСТАНОВЛЕНО 106 375934 12500 / postgres: pos tcp 0 0 127.0.0.1:46202 127.0.0.1:5432 УСТАНОВЛЕНО 0 374932 12241 / python
tcp 0 0 xxx241: 59811 xxx241: 5432 УСТАНОВЛЕНО 0 375933 12451 / sshd: root tcp 0 0 xxx241: 22 xxx158: 62839 УСТАНОВЛЕНО 0 375767 12451 / sshd: root tcp6 0 0 ::: 22 ::: * СЛУШАТЬ 0 9370 936 / sshd
tcp6 0 0 ::: 5432 ::: * СЛУШАТЬ 106 12370 1909 / postgres