Better life with Ubuntu

選單

直接觀看文章
  • 主頁
  • resume
  • 收藏盒

每月封存: 一月 2019

iptables rules for captive login

Posted on 2019 年 01 月 24 日 by wenchiching
/system/bin/iptables /system/bin/iptables -w -t nat --new handysoftapd
/system/bin/iptables /system/bin/iptables -w -t nat -A PREROUTING -j handysoftapd
# allow DHCP 
/system/bin/iptables /system/bin/iptables -w -t nat -A handysoftapd -p udp --dport 67 -j DNAT --to 0.0.0.0:67
# allow DNS
/system/bin/iptables /system/bin/iptables -w -t nat -A handysoftapd -p udp --dport 53 -j DNAT --to 127.0.0.1:53
# disallow other UDP packet(special handle for QUIC/VOIP protocol)
# drop the packet by redirect the packet to a non-exist port
/system/bin/iptables /system/bin/iptables -w -t nat -A handysoftapd -p udp -j DNAT --to 0.0.0.1:1111
# redirect TCP to our web server to show captive login page
/system/bin/iptables /system/bin/iptables -w -t nat -A handysoftapd -p tcp -j DNAT --to 127.0.0.1:8090
# enable routing
/system/bin/sysctl /system/bin/sysctl -w net.ipv4.conf.all.route_localnet=1
發表在 linux、未分類 中 | 已加上的標籤 captive login, iptables, linux | 發表迴響

近期文章

  • scrapy interactive shell example 2020 年 12 月 21 日
  • Fastboot HAL module implemetation 2020 年 10 月 26 日
  • How to remove notify in Android O, customize AOSP 2020 年 08 月 24 日
  • How to change Android PiP default location programmatically 2020 年 08 月 18 日
  • Android sepolicy not work 2020 年 08 月 17 日
  • Android mDNS change host name from Android.local to your customized name 2020 年 08 月 03 日
  • build android 10 with 8G ram laptop 2020 年 05 月 11 日
  • How to install google play on AOSP emulator 2020 年 05 月 08 日
  • disable proximity sensor 2020 年 04 月 28 日
  • Android fail to adjust audio volume 2020 年 04 月 21 日
  • Add setup wizard to AOSP 2020 年 04 月 13 日
  • Android 10 gestural navigation, edge back gesture 2020 年 04 月 09 日
  • suppress Android ANR, crash dialog 2020 年 04 月 06 日
  • Android 10 gesture navigation bar 2020 年 04 月 06 日
  • privileged permission * not in privapp-permissions whitelist 2020 年 04 月 01 日
  • Android binder, native binder, framework binder, application binder 2020 年 03 月 24 日
  • Android 10 multi screen input method(multi-client input editor) 2020 年 03 月 18 日
  • vim search and show result in new tab 2019 年 12 月 23 日
  • how to know which app can receive the intent 2019 年 12 月 23 日
  • silent install on Android 9 device admin needed 2019 年 12 月 20 日
  • setup multi display on Android Virtual Device 2019 年 12 月 17 日
  • cast Android Screen to Linux, scrcpy(open source and free) 2019 年 09 月 16 日
  • gerrit server oauth with office365 2019 年 09 月 04 日
  • findMaxSum 2019 年 07 月 25 日
  • set bit in specific position 2019 年 07 月 25 日
  • I2C communication 2019 年 07 月 16 日
  • two sum(2) 2019 年 07 月 05 日
  • two sum 2019 年 07 月 05 日
  • Libra move 2019 年 06 月 26 日
  • qcom openwrt change boot slot 2019 年 05 月 15 日
  • ubuntu ip set a rule as top in routing table dhcp 2019 年 03 月 07 日
  • SVN remember password 2019 年 02 月 24 日
  • iptables rules for captive login 2019 年 01 月 24 日
  • cross compile AWS IOT mqtt program for Android using AOSP 2018 年 12 月 04 日
  • NAT port forwarding trouble shooting 2018 年 11 月 30 日
  • oem_nat_pre 的來源 2018 年 10 月 10 日
  • curl static executable binary for Android 2018 年 09 月 19 日
  • proxy https packet intercept 2018 年 09 月 08 日
  • android wifi hotspot channel 2018 年 09 月 04 日
  • FOMO3D key 價格計算方法 2018 年 07 月 22 日
  • what if AWS_IOT_MQTT_CLIENT_ID is not unique 2018 年 07 月 11 日
  • How to change ro.xxx property in Android 2018 年 07 月 02 日
  • install paho-mqtt on openWRT 2018 年 06 月 15 日
  • python pip on openWRT 2018 年 06 月 06 日
  • opensource STT lib 2018 年 06 月 01 日
  • SP Flash Tool BROM ERROR : S_FT_DOWNLOAD_FAIL (4008) 2018 年 05 月 30 日
  • curl Alexa 2018 年 05 月 25 日
  • cross compile bash for openWRT on Rasp Pi 3 2018 年 05 月 19 日
  • openwrt wireless wifi ssh connection fail 2018 年 05 月 16 日
  • proxy using sim data instead of wifi 2018 年 01 月 24 日
  • android chrome change user-agent 2018 年 01 月 23 日
  • AOSP Automatic variable $? isn’t supported yet 2018 年 01 月 10 日
  • Android sign key 2017 年 12 月 18 日
  • build alexa on Android 2017 年 12 月 05 日
  • downgrade perl on Ubuntu 16.04 2017 年 12 月 01 日
  • Android.mk tutorial 2017 年 11 月 30 日
  • how to fix/work around unavailable shared library com.google.android.maps 2017 年 11 月 29 日
  • cross compile Alexa to MIPS MT7621 2017 年 11 月 08 日
  • How to add cert file in Android system partition 2017 年 11 月 03 日
  • Head first RaspberryPI3 + Alexa 2017 年 11 月 01 日

近期迴響

wenchiching 在 search or show sepolicy
wenchiching 在 how to create turn_server_cert…
wenchiching 在 AOSP Automatic variable $? isn…
billy 在 AOSP Automatic variable $? isn…
wenchiching 在 php 下載 youtube 的影片,並且取出 mp3 or…

文章存檔

  • 2020 年 十二月 (1)
  • 2020 年 十月 (1)
  • 2020 年 八月 (4)
  • 2020 年 五月 (2)
  • 2020 年 四月 (7)
  • 2020 年 三月 (2)
  • 2019 年 十二月 (4)
  • 2019 年 九月 (2)
  • 2019 年 七月 (5)
  • 2019 年 六月 (1)
  • 2019 年 五月 (1)
  • 2019 年 三月 (1)
  • 2019 年 二月 (1)
  • 2019 年 一月 (1)
  • 2018 年 十二月 (1)
  • 2018 年 十一月 (1)
  • 2018 年 十月 (1)
  • 2018 年 九月 (3)
  • 2018 年 七月 (3)
  • 2018 年 六月 (3)
  • 2018 年 五月 (4)
  • 2018 年 一月 (3)
  • 2017 年 十二月 (3)
  • 2017 年 十一月 (6)
  • 2017 年 十月 (1)
  • 2017 年 九月 (1)
  • 2017 年 八月 (1)
  • 2017 年 七月 (4)
  • 2017 年 六月 (5)
  • 2017 年 五月 (10)
  • 2017 年 四月 (2)
  • 2017 年 三月 (6)
  • 2017 年 二月 (7)
  • 2017 年 一月 (2)
  • 2016 年 十二月 (4)
  • 2016 年 十一月 (10)
  • 2016 年 十月 (5)
  • 2016 年 九月 (5)
  • 2016 年 八月 (6)
  • 2016 年 七月 (15)
  • 2016 年 六月 (2)
  • 2016 年 五月 (1)
  • 2016 年 四月 (1)
  • 2016 年 三月 (2)
  • 2015 年 十月 (1)
  • 2015 年 七月 (4)
  • 2015 年 六月 (2)
  • 2015 年 四月 (7)
  • 2015 年 三月 (8)
  • 2015 年 二月 (17)
  • 2015 年 一月 (5)
  • 2014 年 十二月 (1)
  • 2014 年 九月 (1)
  • 2014 年 七月 (1)
  • 2014 年 四月 (2)
  • 2013 年 六月 (1)
  • 2013 年 三月 (1)
  • 2013 年 一月 (1)
  • 2012 年 八月 (2)
  • 2012 年 七月 (1)
  • 2012 年 六月 (3)
  • 2012 年 五月 (1)
  • 2012 年 四月 (4)
  • 2012 年 二月 (3)
  • 2012 年 一月 (4)
  • 2011 年 十二月 (2)
  • 2011 年 九月 (1)
  • 2011 年 六月 (2)
  • 2011 年 四月 (1)
  • 2011 年 二月 (3)
  • 2011 年 一月 (1)
  • 2010 年 十一月 (1)
  • 2010 年 十月 (1)
  • 2010 年 九月 (2)
  • 2010 年 七月 (2)
  • 2010 年 六月 (1)
  • 2010 年 五月 (2)
  • 2010 年 四月 (3)
  • 2010 年 三月 (1)
  • 2010 年 二月 (1)
  • 2010 年 一月 (2)
  • 2009 年 十二月 (9)
  • 2009 年 十一月 (11)
  • 2009 年 十月 (10)
  • 2009 年 九月 (6)
  • 2009 年 八月 (8)
  • 2009 年 七月 (14)
  • 2009 年 六月 (9)
  • 2009 年 四月 (1)

分類

  • algorithm
  • android
  • avs
  • bitcoin
  • C language
  • C++
  • cryptography
  • css
  • elasticsearch
  • ethereum
  • finance
  • flex
  • FreeBSD
  • FTP
  • gcc
  • gerrit
  • git
  • google app engine
  • html
  • java
  • javascript
  • jQuery
  • Libra
  • linux
  • makefile
  • MATLAB
  • mqtt
  • MySQL
  • perl
  • php
  • pycairo
  • python
  • shell script
  • stt
  • systemC
  • Ubuntu
  • vim
  • VirtualMachine
  • web programming
  • webgl
  • webRTC
  • wordpress
  • 推薦影片
  • 未分類
  • 用 RSS 訂閱最新文章
  • 用 RSS 訂閱最新留言

Firefox

連到我的抓火狐推薦頁!
在 WordPress.com 建立免費網站或網誌. 佈景主題:Able,發表者:WordPress.com。
隱私權與 Cookie:此網站可使用 Cookie。繼續使用此網站即表示你同意使用 Cookie。
若要瞭解更多資訊,包括如何控制 Cookie,請參閱此處: Cookie 政策