Traffic route through Virtual Wifi (station) mode
Posted: Sun Apr 22, 2018 4:09 pm
So my isp sometimes has odd issues where local loop latency spike to 2000ms+ on fiber and can last for few minutes to hours, packet loss etc. (hAP Lite, 6.41)
So what I have done to help bypass some this is type have my android phone host a hotspot over its cell network, lte/3g..etc. So far I have it as Virtual wifi interface (wlan2) under wlan1 as master,
mode=station, masterinterface=wlan1, securityprofile=(wpa2 psk profile for key of phone), made a masq rule under NAT chain=scrnat, outinterface=wlan2, action=masquerade, it connects it passes traffic though that instead of my (wan1) fibre, and it auto creates routes in route list in image below;
However I DO NOT want it route all of my networks traffic to it, just one ip address, in this case 10.0.0.8, I created a mangle rule with packet marking, chain=prerouting scraddress=10.0.0.8 action=markrouting new routing mark=3G passthrough=enabled, created route, dst-address=192.168.43.0/24 gateway=wlan2(reachable) distance=1 (cant set to 0) scope=10 targetscope=10 routing mark=3G, pref.source= 192.168.43.23 (tried leaving it blank, or 192.168.43.0)
This does not work for some reason any ideas? am I missing something?
I am able to do the same setup with pptp or l2tp vpn setup and it works fine I am able to route traffic from the src ip 10.0.0.8 but not over wlan2 interface.
So what I have done to help bypass some this is type have my android phone host a hotspot over its cell network, lte/3g..etc. So far I have it as Virtual wifi interface (wlan2) under wlan1 as master,
mode=station, masterinterface=wlan1, securityprofile=(wpa2 psk profile for key of phone), made a masq rule under NAT chain=scrnat, outinterface=wlan2, action=masquerade, it connects it passes traffic though that instead of my (wan1) fibre, and it auto creates routes in route list in image below;
However I DO NOT want it route all of my networks traffic to it, just one ip address, in this case 10.0.0.8, I created a mangle rule with packet marking, chain=prerouting scraddress=10.0.0.8 action=markrouting new routing mark=3G passthrough=enabled, created route, dst-address=192.168.43.0/24 gateway=wlan2(reachable) distance=1 (cant set to 0) scope=10 targetscope=10 routing mark=3G, pref.source= 192.168.43.23 (tried leaving it blank, or 192.168.43.0)
This does not work for some reason any ideas? am I missing something?
I am able to do the same setup with pptp or l2tp vpn setup and it works fine I am able to route traffic from the src ip 10.0.0.8 but not over wlan2 interface.