Прошивка: V2.01B01T01.RU.20060522
Внутренняя машина 192.168.1.2
Внешний адрес (ifconfig ppp0 на modemе): 83.237.114.162
# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT udp -- anywhere anywhere udp dpt:6022 to:192.168.1.2:22
DNAT tcp -- anywhere anywhere tcp dpt:6022 to:192.168.1.2:22
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
CFG tcp -- 192.168.1.2 anywhere tcp dpt:www Records Packet's Source Interface
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP udp -- anywhere anywhere udp dpt:bootps
ACCEPT igmp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:8082
ACCEPT udp -- anywhere anywhere udp dpt:161
ACCEPT icmp -- anywhere anywhere icmp echo-request state NEW
ACCEPT icmp -- anywhere anywhere icmp echo-request state NEW
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SYN TCPMSS set 1360
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP tcp -- anywhere anywhere tcp dpt:telnet
DROP tcp -- anywhere anywhere tcp dpt:ftp
DROP tcp -- anywhere anywhere tcp dpt:ftp-data
DROP udp -- anywhere anywhere udp dpt:500
DROP tcp -- anywhere anywhere tcp dpt:domain
DROP udp -- anywhere anywhere udp dpt:domain
DROP udp -- anywhere anywhere udp dpt:bootps
DROP udp -- anywhere anywhere udp dpt:route
ACCEPT igmp -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp echo-request state NEW
ACCEPT udp -- anywhere 192.168.1.2 udp dpt:ssh
ACCEPT tcp -- anywhere 192.168.1.2 tcp dpt:ssh
ACCEPT icmp -- anywhere anywhere icmp echo-request state NEW
DROP all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DROP icmp -- anywhere anywhere icmp destination-unreachable
DROP icmp -- anywhere anywhere state INVALID
То есть вроде бы все верно: обращение на внешний порт (6022) -> port mapping на 192.168.1.2:22
Настраивал все и через web и руками -- ноль:
$ ssh root@83.237.114.162 -p 6022
ssh: connect to host 83.237.114.162 port 6022: Connection refused
[gl00my@pr-shellE ~]$ ssh alex@83.237.114.162 -p 6022
ssh: connect to host 83.237.114.162 port 6022: Connection refused
# /usr/sbin/sshd -4 -Dd
debug1: sshd version OpenSSH_4.3p2 Debian-8ubuntu1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-4'
debug1: rexec_argv[2]='-Dd'
debug1: Bind to port 22 on 192.168.1.2.
Server listening on 192.168.1.2 port 22.
Висит как висел.
Помогите пожалуйста, а то я скоро сойду с ума. Что я делаю не так?
На более старой прошивке говорят настраивалось нормально.
P.S. Естевтвенно:
alex@legacy:~$ ssh alex@192.168.1.2
alex@192.168.1.2's password: