nat 관련하여....외부에서 내부 특정포트를 열어주려고 하는데?
저희 내부망 ip는 10.1.1.x 를 쓰고 있고...방화벽서버는 고정ip인 61.33.39.x를 쓰고 잇는데...
뷰독서비스를 해주는 컴퓨터가 잇는데....
인터넷으로 일반인들이 볼수 잇거든요..고정아이피로 잡을땐
그러나 사설ip로 잡으면...인터넷으로 볼수 가 없어요...포트를 열어줘야한다고 하는데...(14401-14403)
참고로 저의 방화벽 서버 nat 구성은 ..
Rule 8(NAT)
#
#
$IPTABLES -t nat -A PREROUTING -p all -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 11/0 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 11/1 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 0/0 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 3 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 3/1 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 8/0 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p icmp -d 61.33.39.201 --icmp-type 3/3 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp --source-port 61000:65095 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -d 61.33.39.201 --destination-port 1024:65535 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -d 61.33.39.201 --destination-port 6000:6063 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp --source-port 20 -d 61.33.39.201 --destination-port 1024:65535 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp --source-port 1024:65534 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport -d 61.33.39.201 --destination-port 53,139,5631,2105,543,544,88,2049,26000,554,7070,135,42,445,389 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport -d 61.33.39.201 --destination-port 636,3268,3269,5190,,1494,709,710,1720,2000,2998,49,113,13,79 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport -d 61.33.39.201 --destination-port 21,20,80,443,143,993,6667,98,98,515,1433,3306,119,563,110 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport -d 61.33.39.201 --destination-port 995,5432,515,512,513,514,4321,5510,25,465,1080,1521,3128,22,111 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport -d 61.33.39.201 --destination-port 23,540,3389,7100,,80 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp -d 61.33.39.201 --destination-port 749:750 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp --source-port 61000:65095 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp -d 61.33.39.201 --destination-port 1024:65535 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp -d 61.33.39.201 --destination-port 7000:7009 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp -d 61.33.39.201 --destination-port 33434:33524 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp -m multiport -d 61.33.39.201 --destination-port 68,67,53,138,137,5632,88,464,4444,2049,26000,,4000,500,520 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p udp -m multiport -d 61.33.39.201 --destination-port 1645,513,13,22555,135,139,123,1024,161,162,111,514,69 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p 47 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p 50 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p 51 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p 57 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -p 112 -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
$IPTABLES -t nat -A PREROUTING -d 61.33.39.201 -j DNAT --to-destination 10.1.1.26
#
뷰독 서비스를 해주는 컴퓨터의 사설ip는 10.1.1.26 이고..nat 로 고정ip는 61.33.39.201 이거든요
외부에서 ping 도 되고 터미널 서비스도 되고...http/ftp 도 되는데...특정포트만 못열겟네요
아...
안녕하세요..
얼핏 기억에 --dport 라는 걸 썼던것 같습니다.
man iptables에서 한번 확인해 보시고 사용해 보세요..
그럼 즐거운 하루 되세요 ^^;
세상은 넓고, 할 일은 많은데, 난 숨만 쉬고 있니?
댓글 달기