Advertisement
Guest User

Untitled

a guest
Sep 27th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. #
  2. # dnsmasq configuration file @ /etc/dnsmasq.d/dnsmasq.conf
  3. #
  4.  
  5. interface=wlan1
  6. interface=eth0
  7.  
  8. bogus-priv
  9. domain-needed
  10. expand-hosts
  11. domain=slovensko.lan
  12. local=/slovensko.lan/
  13.  
  14. # set dhcp ranges for each interface separately
  15. dhcp-range=interface:wlan1,192.168.101.150,192.168.101.200,1m
  16. dhcp-range=interface:eth0,192.168.100.150,192.168.100.200,1m
  17.  
  18. # anything computer-like on wlan1
  19. #
  20. dhcp-host=78:ca:39:ae:b9:3f,lucka,192.168.101.100,1m
  21. dhcp-host=00:23:12:08:98:ac,barbuuska,192.168.101.101,1m
  22.  
  23. # anything phone-like on wlan1
  24. #
  25. dhcp-host=78:d6:f0:d3:42:60,patrik-phone,192.168.101.120,1m
  26. dhcp-host=14:7d:c5:44:6c:f6,lucka-phone,192.168.101.121,1m
  27.  
  28. # anything computer-like on eth0
  29. #
  30. dhcp-host=b8:27:eb:af:c9:b6,domov,192.168.100.100,1m
  31.  
  32. # For debugging purposes, log each DNS query as it passes through
  33. # dnsmasq.
  34. log-queries
  35.  
  36. # Log lots of extra information about DHCP transactions.
  37. log-dhcp
  38.  
  39. ##############################################################################################
  40.  
  41. # network configuration @ /etc/network/interfaces
  42. #
  43. # This file describes the network interfaces available on your system
  44. # and how to activate them. For more information, see interfaces(5).
  45.  
  46. # The loopback network interface
  47. auto lo
  48. iface lo inet loopback
  49.  
  50. #
  51. # Just write some script to setup iptables and kernel parameters
  52. # independently on specific interface. TODO
  53. #
  54. # The primary network interface
  55. auto eth0
  56. iface eth0 inet static
  57. address 192.168.100.1
  58. netmask 255.255.255.0
  59. network 192.168.100.0
  60. gateway 192.168.100.1
  61. broadcast 192.168.100.255
  62. up sysctl -w net.ipv4.ip_forward=1 && echo "IPV4 forwarding enbled."
  63. up iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE && echo "NAT on wlan0 enabled."
  64. post-down sysctl -w net.ipv4.ip_forward=0 && echo "IPV4 forwarding disabled (default)"
  65. post-down iptables -t nat -F && echo "NAT on wlan0 disabled (default)"
  66.  
  67. auto wlan1
  68. iface wlan1 inet static
  69. address 192.168.101.1
  70. netmask 255.255.255.0
  71. network 192.168.101.0
  72. gateway 192.168.101.1
  73. broadcast 192.168.101.255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement