안드로이드 패킷 포워딩(burp 등으로)용 iptables 명령어 정리. 


보통 proxydroid, autoproxy 등 자동 설정 apk 를 이용하면 되지만 80, 8080, 443이 아닌 경우 


리다이렉트가 안되는 경우가 있다. 그런 경우 직접 아래와 같이 iptables 로 세팅해줄 수 있다.





# iptables -F    // 전체 삭제


# iptables -L -t nat  // nat 리스트




아래는 proxydroid 포트로 리다이렉트 하는 경우.


# iptables -A OUTPUT -t nat -p tcp --dport 10443 -j REDIRECT --to-port 8124


Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination

REDIRECT   udp  --  anywhere             anywhere             udp dpt:domain redir ports 54358

RETURN     tcp  --  anywhere             192.168.43.187

REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:http redir ports 8123

REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:https redir ports 8124

REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:5228 redir ports 8124

REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:10443 redir ports 8124




+ Recent posts