blob: 24d351c831ce263abd8c79055133449a3aa9f399 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# This is an iface stanza for interfaces(5) with relatively sane
# defaults. Consult http://manpages.org/etc-network-interfaces/5 for
# more.
#
# The `eth0` networking interface represents the virtual Ethernet card
# of the guest, which is shared with the host. The `gateway` IP
# address should match with the address as it was configured on the
# host, and `address` is the guest's own address. In addition to
# this, it is recommended to setup a Network Address Translation (NAT)
# on the host between `wifibox0` and the interface that faces towards
# the Internet. This can be done with the help of pf(4) for example.
# Here is sample configuration, see pf.conf(5) for more information.
#
# wlan_if="wifibox0"
# lan_if="em0"
# virt_net="10.0.0.0/24"
#
# scrub all
# nat on $lan_if from $virt_net to any -> $lan_if
# pass log all
#
# Change these values as desired, they are here only for inspiration.
# Note that configuring the NAT requires the IP packet forwarding to
# be enabled as well. This could be done for example by adding
# `gateway_enable="YES"` to rc.conf(5) along with `pf_enable="YES"`.
#
# gateway_enable="YES"
# pf_enable="YES"
#
# The gateway address on the host should be brought up by assigning an
# IP address for the `wifibox0` network interface. For example,
# adding the following line to rc.conf(5) will implement this.
#
# ifconfig_wifibox0="inet 10.0.0.1/24"
#
# The specified address could be then set for `gateway` at the
# definition of `eth0`.
iface eth0 inet static
gateway 10.0.0.1
address 10.0.0.2/24
# The `wlan0` networking interface is associated with the wireless
# networking card as it is exposed by the driver. By this default
# configuration, the corresponding IP address is statically set to
# make it the gateway for the wireless network, see the contents of
# udhcp.conf for the rest.
iface wlan0 inet static
address 192.168.0.1/24
|