хочу чтоб коннекты к моему 504T снаружи на 22 порт то есть по ppp0
шли на 22 порт 192.168.1.2
сообсна сказал такое
iptables -t nat -A PREROUTING -p tcp -i ppp0 --dport 22 -j DNAT --to-destination 192.168.1.2:22
по iptables -L
все вроде есть
Код:
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere 192.168.1.2 tcp dpt:www
ACCEPT tcp -- anywhere 192.168.1.2 tcp dpt:ssh
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SYN TCPMSS set 1360
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
однако не работает ((
то есть коннект снаружи на 22 не перекидывает на 22 внутри..