Originally Posted by
Power
Можно реализовать любой из этих вариантов. Но для первого понадобится определить, что подразумевается под "локальной сетью", а точнее - какие IP-адреса в неё входят.
Так какой вариант вам нужен?
Локальная подсеть - 10.0.0.0
Мне тут мысль пришла: Просканировал порты программой из вне. В результате оказалось, что порт 80 открыт, порт 82 - закрыт.
добавил командой iptables порт 82:
PHP Code:
iptables -I INPUT -p tcp --dport 82:82 -j ACCEPT
iptables -I INPUT -p udp --dport 82:82 -j ACCEPT
после этого iptables показывает, что вроде порт 82 открыт, но при сканировании портов видно что порт 82 всетаки закрыт.
Code:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:82
ACCEPT tcp -- anywhere anywhere tcp dpt:82
ACCEPT udp -- anywhere anywhere udp dpts:mysql:3307
ACCEPT tcp -- anywhere anywhere tcp dpts:mysql:3307
ACCEPT udp -- anywhere anywhere udp dpts:51777:51780
ACCEPT tcp -- anywhere anywhere tcp dpts:51777:51780
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state NEW
ACCEPT all -- anywhere anywhere state NEW
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN TCPMSS clamp to PMTU
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
DROP all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate DNAT
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain MACS (0 references)
target prot opt source destination
Chain SECURITY (0 references)
target prot opt source destination
RETURN tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN limit: avg 1/sec burst 5
RETURN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5
RETURN udp -- anywhere anywhere limit: avg 5/sec burst 5
RETURN icmp -- anywhere anywhere limit: avg 5/sec burst 5
DROP all -- anywhere anywhere
Chain logaccept (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `ACCEPT '
ACCEPT all -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `DROP '
DROP all -- anywhere anywhere
или я все таки не в ту сторону копаю. Я уже ХЗ