を代わりにあなたも、複数の設定ファイルにリストに追加したい各インターフェイスのための1つを/etc/dnsmasq.d/
下を作成することができますdhcp。あなたはwlan0
とwlan1
という名前の2つの無線インターフェースを持っており、あなたがそれらの上にDHCP DNSMASQへの感謝を提供したい場合は、あなたが各インターフェイスを設定する/etc/dnsmasq.d/
下の2つのファイルを作成することができます。例えば
:
/etc/dnsmasq.d/dnsmasq-wlan0.conf
:
interface=wlan0 # Use interface wlan0
listen-address=10.0.0.1 # Explicitly specify the address to listen on
bind-interfaces # Bind to the interface to make sure we aren't sending things elsewhere
server=8.8.8.8 # Forward DNS requests to Google DNS
domain-needed # Don't forward short names
bogus-priv # Never forward addresses in the non-routed address spaces.
dhcp-range=10.0.0.50,10.0.0.150,12h # Assign IP addresses between 10.0.0.50 and 10.0.0.150 with a 12 hour lease time
/etc/dnsmasq.d/dnsmasq-wlan1.conf
:私のTに
interface=wlan1 # Use interface wlan0
listen-address=20.0.0.1 # Explicitly specify the address to listen on
bind-interfaces # Bind to the interface to make sure we aren't sending things elsewhere
server=8.8.8.8 # Forward DNS requests to Google DNS
domain-needed # Don't forward short names
bogus-priv # Never forward addresses in the non-routed address spaces.
dhcp-range=20.0.0.50,20.0.0.150,12h # Assign IP addresses between 20.0.0.50 and 20.0.0.150 with a 12 hour lease time
hatはシステムを設定する非常にクリーンな方法で、リブートの間に設定を保持します。
さまざまなインターフェイスはどこで機能しますか。ホームネットワークとワークネットワークに2つの異なるインターフェースを使用していますか? VMのIPが変わるのはなぜですか? – kichik
はい、家庭用(192.168.0。*)と仕事用(10.0.0。*)の2つの異なるインターフェイスでした。変更は、作業IPとホームIPの間で行われます。 –