Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # dnsmasq configuration file @ /etc/dnsmasq.d/dnsmasq.conf
- #
- interface=wlan1
- interface=eth0
- bogus-priv
- domain-needed
- expand-hosts
- domain=slovensko.lan
- local=/slovensko.lan/
- # set dhcp ranges for each interface separately
- dhcp-range=interface:wlan1,192.168.101.150,192.168.101.200,1m
- dhcp-range=interface:eth0,192.168.100.150,192.168.100.200,1m
- # anything computer-like on wlan1
- #
- dhcp-host=78:ca:39:ae:b9:3f,lucka,192.168.101.100,1m
- dhcp-host=00:23:12:08:98:ac,barbuuska,192.168.101.101,1m
- # anything phone-like on wlan1
- #
- dhcp-host=78:d6:f0:d3:42:60,patrik-phone,192.168.101.120,1m
- dhcp-host=14:7d:c5:44:6c:f6,lucka-phone,192.168.101.121,1m
- # anything computer-like on eth0
- #
- dhcp-host=b8:27:eb:af:c9:b6,domov,192.168.100.100,1m
- # For debugging purposes, log each DNS query as it passes through
- # dnsmasq.
- log-queries
- # Log lots of extra information about DHCP transactions.
- log-dhcp
- ##############################################################################################
- # network configuration @ /etc/network/interfaces
- #
- # This file describes the network interfaces available on your system
- # and how to activate them. For more information, see interfaces(5).
- # The loopback network interface
- auto lo
- iface lo inet loopback
- #
- # Just write some script to setup iptables and kernel parameters
- # independently on specific interface. TODO
- #
- # The primary network interface
- auto eth0
- iface eth0 inet static
- address 192.168.100.1
- netmask 255.255.255.0
- network 192.168.100.0
- gateway 192.168.100.1
- broadcast 192.168.100.255
- up sysctl -w net.ipv4.ip_forward=1 && echo "IPV4 forwarding enbled."
- up iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE && echo "NAT on wlan0 enabled."
- post-down sysctl -w net.ipv4.ip_forward=0 && echo "IPV4 forwarding disabled (default)"
- post-down iptables -t nat -F && echo "NAT on wlan0 disabled (default)"
- auto wlan1
- iface wlan1 inet static
- address 192.168.101.1
- netmask 255.255.255.0
- network 192.168.101.0
- gateway 192.168.101.1
- broadcast 192.168.101.255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement