Linux 板


LINE

大家好,新年快乐,不好意思我又来问关於网路设定的问题了。 先说一下目的: 想要将目前的有线网路用本机的wlan开AP给手机上网。 现在的做法是直接安装create_ap, https://github.com/oblique/create_ap 装好後可以正常用手机连上AP,但不能上网, 因为敝司连网是必须透过proxy才能连出去的, 後来在手机端发现WiFi连线那边可以设定proxy, 但是手机上Wifi设定那边有写到 "浏览器会使用HTTP Proxy,但其他应用程式不一定会采用这项设定" 而实际使用也是如此,用chrome可以正常上网, 但LINE就不能连上, 後来study了好久,似乎可以用iptables来设定让分享的AP透过proxy出去? 不过研究了好久还是不会用,所以上来看看有没有那位大大知道要怎麽设定的? 以下是iptables的设定: 在开AP之前用iptables -L & iptables -t nat -L都是空的 开了之後用ifconfig看会多一个ap0,iptables也多好几个 server:~$ ifconfig ap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.12.1 netmask 255.255.255.0 broadcast 192.168.12.255 inet6 fe80::faa2:d6ff:febd:5c6e prefixlen 64 scopeid 0x20<link> ether f8:a2:d6:bd:5c:6e txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 33 bytes 5084 (5.0 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 server:~$ sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:bootps ACCEPT udp -- anywhere anywhere udp dpt:mdns ACCEPT tcp -- anywhere anywhere tcp dpt:mdns Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere 192.168.12.0/24 ACCEPT all -- 192.168.12.0/24 anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination server:~$ sudo iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination REDIRECT udp -- 192.168.12.0/24 server udp dpt:domain redir ports 5353 REDIRECT tcp -- 192.168.12.0/24 server tcp dpt:domain redir ports 5353 Chain INPUT (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- 192.168.12.0/24 anywhere 然後我的proxy是http://10.110.11.12:8080/ 不知道是否能用iptables去指定这个AP是透过proxy去传输? 可以的话要如何设定才能顺利做到这个功能呢? 以上,感谢收看以及协助的大大喔! -- 寻找理想中的房子~ --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 59.124.231.69
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1550227410.A.091.html
1F:推 blackbox: http proxy可以通?line电脑版有proxy可以设定 02/15 20:05
2F:→ blackbox: 手机的话要用vpn形式去钻 02/15 20:07
3F:→ blackbox: 你隔了一层nat,试试看ssh tunnel能不能用 02/15 20:09
4F:→ starlin2: 不是很了解要怎麽试....>< 02/18 17:03
5F:→ starlin2: 刚试着在手机装上ssh tunnel,不过不能连.... 02/18 17:27
6F:→ starlin2: 对了,我知道line电脑版可以设定proxy,但手机的没有。 02/18 17:27
7F:→ starlin2: 更新一下,试了好几个VPN,最後用Ultimate VPN 02/18 17:45
8F:→ starlin2: 连到一个TCP的server後可以用了....^^ 02/18 17:46
9F:推 blackbox: ssh -L *:8888:10.110.11.12:8080 [email protected] 02/18 20:13
10F:→ blackbox: 这样可以开一个8888转到proxy去 02/18 20:14
11F:推 blackbox: linux直接走全域proxy的话,NAT这边会不会一起走? 02/18 20:22
12F:→ blackbox: 有开ip forwarding的话,应该会直接连到proxy 02/18 20:29
13F:→ blackbox: 其实是http proxy不给line用吧 02/18 20:29
14F:→ anakinsean: Google 找一下 transparent proxy 02/20 22:04







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Boy-Girl站内搜寻

TOP