2017-01-05 2 views
3

패킷 포워딩 규칙을 내 iptable에 추가했습니다.
sudo iptables -t nat -A PREROUTING -p tcp --dport 1111 -j DNAT --to-destination 10.0.3.126:80
그리고 1111 포트로 들어오는 패킷이 10.0.3.126:80으로 올바르게 전달되었음을 알 수 있습니다. 그러나 규칙을 나열하면 내가 추가 한 규칙을 볼 수 없습니다.리눅스에서 iptable에서 PREROUTING 목록을 확인하는 방법은 무엇입니까?

sudo iptables -L 
Chain INPUT (policy ACCEPT) 
target  prot opt source    destination 
ACCEPT  tcp -- anywhere    anywhere    tcp dpt:domain 
ACCEPT  udp -- anywhere    anywhere    udp dpt:domain 
ACCEPT  tcp -- anywhere    anywhere    tcp dpt:bootps 
ACCEPT  udp -- anywhere    anywhere    udp dpt:bootps 

Chain FORWARD (policy ACCEPT) 
target  prot opt source    destination 
ACCEPT  all -- anywhere    anywhere 
ACCEPT  all -- anywhere    anywhere 

Chain OUTPUT (policy ACCEPT) 
target  prot opt source    destination 

내가 추가 한 규칙은 어떻게 볼 수 있습니까? 미리 감사드립니다.

+0

sudo는 iptables에-저장 –

+0

감사 @MichaelO 규칙. –

답변

6

사용 iptables -L -n -t nat 명령
사슬을 PREROUTING하는 NAT의 일부이기 때문에이

관련 문제