종속 포털 앱에 대한 iptables 설정

종속 포털 앱에 대한 iptables 설정

iptables(버전 1.6)가 있는 nethunter 장치에 문제가 있습니다.
나는 플라스크 서버(http 포트 80)와 Hostapd를 사용하여 AP를 생성하는 스크립트를 만들었습니다.

리디렉션에는 dnsmasq(10.0.0.1 주소)를 사용합니다.

dnsmasq 구성:

interface=wlan1
dhcp-range=10.0.0.10,10.0.0.100,8h
dhcp-option=3,10.0.0.1
dhcp-option=6,10.0.0.1
address=/#/10.0.0.1
no-resolv

인터페이스를 설정하고 포트 전달을 활성화하는 명령:

os.system('route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1')
os.system('echo 1 > /proc/sys/net/ipv4/ip_forward')

아래의 Iptables 구성:

os.system('iptables -F') # Flush old iptables rules
os.system('iptables -A INPUT -i lo -j ACCEPT') # Enable traffic on localhost
os.system('iptables -A INPUT -p tcp --dport 80 -j ACCEPT') # Allow http connection

내 데스크톱에서는 작동하지만 왜 nethunter에서는 작동하지 않는지 모르겠습니다. Iptables에 오류가 표시되지 않고 AP와 서버가 시작되지만 팝업 로그인 메시지가 다른 모바일 장치에 표시되지 않습니다.

iptables 구성에 문제가 있거나 해당 문제를 일으킬 수 있는 것이 있는지 설명해주세요.

관련 정보