Can I assign a virtual interface of wireless to a network namespace?
0
votes
1
answer
732
views
I am trying to make a VPN router while keeping the host itself accessing Internet without VPN. The host has only one NIC which is wireless. So I have added two virtual interfaces via
iw phy phy0 interface add xxxxx
. One (wlan0_sta) as station to connect wireless to Internet. The other (wlan0_ap) as AP to connect clients. Also a wireguard device (wg0) as VPN endpoint. hostapd and iptables were involved.
Now every part worked, except data from clients were routed to wlan0_sta, instead of wg0. So I planned to have wlan0_ap and wg0 in a separated network namespace to make the routing work. But I found that iw
cannot put virtual interface into network namespace. Only a "phy" can be put into network namespace.
So what should I do?
Asked by Magicloud
(773 rep)
Oct 16, 2018, 10:31 AM
Last activity: Apr 2, 2024, 07:06 PM
Last activity: Apr 2, 2024, 07:06 PM