Тема: IPFW + NATD проброс 23 порта
Добрый день, настраивал перенаправление 23 порта с внешнего интернета во внутреннюю машину находящуюся за натом.
Настройки /etc/natd.conf
redirect_port tcp 192.168.39.1:23 23
Настройки /etc/ipfw.rules
${fwcmd} add 280 divert natd ip from any to ${IpOut} in via ${LanOut}
${fwcmd} add 281 divert 23 tcp from 219.217.246.72 to 91.189.237.94
${fwcmd} add 284 divert 23 tcp from 192.168.39.1 to 219.217.246.72
${fwcmd} 5050 add pass all from any to any 23
${fwcmd} 5060 add allow ip from 219.217.246.72 to 91.189.237.94
${fwcmd} 5060 add allow ip from 91.189.237.94 to 219.217.246.72
tcpdump говорит следующее, но по телнету не пускает, пишет "сбой подключения":
machine001# tcpdump -ni rl0 host 192.168.39.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rl0, link-type EN10MB (Ethernet), capture size 96 bytes
14:25:47.359513 IP 222.171.176.82.57264 > 192.168.39.1.23: S 489985283:489985283(0) win 1400
14:25:47.359711 IP 192.168.39.1.23 > 222.171.176.82.57264: S 85134261:85134261(0) ack 489985284 win 511 <mss 1024>
14:25:47.581637 IP 219.217.246.72.11545 > 192.168.39.1.23: S 1300033668:1300033668(0) win 8192 <mss 1414,nop,wscale 2,nop,nop,sackOK>
14:25:47.581847 IP 192.168.39.1.23 > 219.217.246.72.11545: R 0:0(0) ack 1300033669 win 0
14:25:48.046191 IP 222.171.176.82.57264 > 192.168.39.1.23: R 489985284:489985284(0) win 1400
14:25:50.600658 IP 219.217.246.72.11545 > 192.168.39.1.23: S 1300033668:1300033668(0) win 8192 <mss 1414,nop,wscale 2,nop,nop,sackOK>
14:25:50.600849 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:51.400793 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:52.200753 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:53.000776 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:53.800772 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:54.194803 arp who-has 192.168.39.1 tell 192.168.39.1
14:25:54.600775 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:55.400791 IP 192.168.39.1.23 > 219.217.246.72.11545: S 100188343:100188343(0) ack 1300033669 win 511 <mss 1024>
14:25:56.597650 IP 219.217.246.72.35071 > 192.168.39.1.23: S 1300033668:1300033668(0) win 65535 <mss 1414,nop,nop,sackOK>
14:25:56.597838 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
14:25:57.397806 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
14:25:58.197758 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
14:25:58.997805 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
14:25:59.797768 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
14:26:00.597769 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
14:26:01.397750 IP 192.168.39.1.23 > 219.217.246.72.35071: S 116313990:116313990(0) ack 1300033669 win 511 <mss 1024>
И что то расшифровать не могу, в чем у меня проблема. Прошу вашей помощи.
Заранее спасибо.