概要
-
PC <--> [wlan0(本体) - ラズパイ3 - (USB)wlan1] <-> Wifiルータ <->Internet
みたいな感じ - キホン、[メモ] Raspberry Pi 3で、Wi-Fi アクセスポイントルータ
- iptablesの設定で、
eth0
のかわりに、wlan1
(USB WiFiドングル)にする。
環境
- Raspberry Pi 3 + USB WiFiドングル(RTL8188CUS)
手順
- ↑のリンクのアクセスポイントの設定を行う。
-
iptablesの設定で
-
eth0
のかわりに、wlan1
にする
または -
以下のスクリプト使用(VPNGateのとこで使ったやつ)
wget https://raw.githubusercontent.com/mt08xx/vgc/master/chif -O ./chif chmod +x ./chif ./chif wlan1 sudo mv -i /etc/iptables.ipv4.nat /etc/iptables.ipv4.nat.bak sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
sudo reboot
-
その他
- ネットワークIntefaceを入れ替えればいろいろできるので、有線LANの機器へ中継、なんてのもできる。
PC(有線LAN) <--> [eth0 - ラズパイ - wlan0] <-> Wifiルータ <->Internet
- chifスクリプト内の
IF_from=wlan0
を書き換えればラク?