Advertisement
ionstorm66

Untitled

Apr 21st, 2014
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.91 KB | None | 0 0
  1. ######################################################################
  2. # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
  3. #
  4. # A "#" character in the very first column makes the rest of the line
  5. # be ignored. Blank lines are ignored. Lines may be indented freely.
  6. # A "\" character at the very end of the line indicates the next line
  7. # should be treated as a continuation of the current one.
  8. #
  9. # The "pre-up", "up", "down" and "post-down" options are valid for all
  10. # interfaces, and may be specified multiple times. All other options
  11. # may only be specified once.
  12. #
  13. # See the interfaces(5) manpage for information on what options are
  14. # available.
  15. ######################################################################
  16. # We always want the loopback interface.
  17. #
  18. # auto lo
  19. # iface lo inet loopback
  20. # An example ethernet card setup: (broadcast and gateway are optional)
  21. #
  22. # auto eth0
  23. # iface eth0 inet static
  24. # address 192.168.0.42
  25. # network 192.168.0.0
  26. # netmask 255.255.255.0
  27. # broadcast 192.168.0.255
  28. # gateway 192.168.0.1
  29. # A more complicated ethernet setup, with a less common netmask, and a downright
  30. # weird broadcast address: (the "up" lines are executed verbatim when the
  31. # interface is brought up, the "down" lines when it's brought down)
  32. #
  33. # auto eth0
  34. # iface eth0 inet static
  35. # address 192.168.1.42
  36. # network 192.168.1.0
  37. # netmask 255.255.255.128
  38. # broadcast 192.168.1.0
  39. # up route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2
  40. # up route add default gw 192.168.1.200
  41. # down route del default gw 192.168.1.200
  42. # down route del -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2
  43. # A more complicated ethernet setup with a single ethernet card with
  44. # two interfaces.
  45. # Note: This happens to work since ifconfig handles it that way, not because
  46. # ifup/down handles the ':' any differently.
  47. # Warning: There is a known bug if you do this, since the state will not
  48. # be properly defined if you try to 'ifdown eth0' when both interfaces
  49. # are up. The ifconfig program will not remove eth0 but it will be
  50. # removed from the interfaces state so you will see it up until you execute:
  51. # 'ifdown eth0:1 ; ifup eth0; ifdown eth0'
  52. # BTW, this is "bug" #193679 (it's not really a bug, it's more of a
  53. # limitation)
  54. #
  55. # auto eth0 eth0:1
  56. # iface eth0 inet static
  57. # address 192.168.0.100
  58. # network 192.168.0.0
  59. # netmask 255.255.255.0
  60. # broadcast 192.168.0.255
  61. # gateway 192.168.0.1
  62. # iface eth0:1 inet static
  63. # address 192.168.0.200
  64. # network 192.168.0.0
  65. # netmask 255.255.255.0
  66. # "pre-up" and "post-down" commands are also available. In addition, the
  67. # exit status of these commands are checked, and if any fail, configuration
  68. # (or deconfiguration) is aborted. So:
  69. #
  70. # auto eth0
  71. # iface eth0 inet dhcp
  72. # pre-up [ -f /etc/network/local-network-ok ]
  73. #
  74. # will allow you to only have eth0 brought up when the file
  75. # /etc/network/local-network-ok exists.
  76. # Two ethernet interfaces, one connected to a trusted LAN, the other to
  77. # the untrusted Internet. If their MAC addresses get swapped (because an
  78. # updated kernel uses a different order when probing for network cards,
  79. # say), then they don't get brought up at all.
  80. #
  81. # auto eth0 eth1
  82. # iface eth0 inet static
  83. # address 192.168.42.1
  84. # netmask 255.255.255.0
  85. # pre-up /path/to/check-mac-address.sh eth0 11:22:33:44:55:66
  86. # pre-up /usr/local/sbin/enable-masq
  87. # iface eth1 inet dhcp
  88. # pre-up /path/to/check-mac-address.sh eth1 AA:BB:CC:DD:EE:FF
  89. # pre-up /usr/local/sbin/firewall
  90. # Two ethernet interfaces, one connected to a trusted LAN, the other to
  91. # the untrusted Internet, identified by MAC address rather than interface
  92. # name:
  93. #
  94. # auto eth0 eth1
  95. # mapping eth0 eth1
  96. # script /path/to/get-mac-address.sh
  97. # map 11:22:33:44:55:66 lan
  98. # map AA:BB:CC:DD:EE:FF internet
  99. # iface lan inet static
  100. # address 192.168.42.1
  101. # netmask 255.255.255.0
  102. # pre-up /usr/local/sbin/enable-masq $IFACE
  103. # iface internet inet dhcp
  104. # pre-up /usr/local/sbin/firewall $IFACE
  105. # A PCMCIA interface for a laptop that is used in different locations:
  106. # (note the lack of an "auto" line for any of these)
  107. #
  108. # mapping eth0
  109. # script /path/to/pcmcia-compat.sh
  110. # map home,*,*,* home
  111. # map work,*,*,00:11:22:33:44:55 work-wireless
  112. # map work,*,*,01:12:23:34:45:50 work-static
  113. #
  114. # iface home inet dhcp
  115. # iface work-wireless bootp
  116. # iface work-static static
  117. # address 10.15.43.23
  118. # netmask 255.255.255.0
  119. # gateway 10.15.43.1
  120. #
  121. # Note, this won't work unless you specifically change the file
  122. # /etc/pcmcia/network to look more like:
  123. #
  124. # if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
  125. # get_info $DEVICE
  126. # case "$ACTION" in
  127. # 'start')
  128. # /sbin/ifup $DEVICE
  129. # ;;
  130. # 'stop')
  131. # /sbin/ifdown $DEVICE
  132. # ;;
  133. # esac
  134. # exit 0
  135. # An alternate way of doing the same thing: (in this case identifying
  136. # where the laptop is is done by configuring the interface as various
  137. # options, and seeing if a computer that is known to be on each particular
  138. # network will respond to pings. The various numbers here need to be chosen
  139. # with a great deal of care.)
  140. #
  141. # mapping eth0
  142. # script /path/to/ping-places.sh
  143. # map 192.168.42.254/24 192.168.42.1 home
  144. # map 10.15.43.254/24 10.15.43.1 work-wireless
  145. # map 10.15.43.23/24 10.15.43.1 work-static
  146. #
  147. # iface home inet dhcp
  148. # iface work-wireless bootp
  149. # iface work-static static
  150. # address 10.15.43.23
  151. # netmask 255.255.255.0
  152. # gateway 10.15.43.1
  153. #
  154. # Note that the ping-places script requires the iproute package installed,
  155. # and the same changes to /etc/pcmcia/network are required for this as for
  156. # the previous example.
  157. # Set up an interface to read all the traffic on the network. This
  158. # configuration can be useful to setup Network Intrusion Detection
  159. # sensors in 'stealth'-type configuration. This prevents the NIDS
  160. # system to be a direct target in a hostile network since they have
  161. # no IP address on the network. Notice, however, that there have been
  162. # known bugs over time in sensors part of NIDS (for example see
  163. # DSA-297 related to Snort) and remote buffer overflows might even be
  164. # triggered by network packet processing.
  165. #
  166. # auto eth0
  167. # iface eth0 inet manual
  168. # up ifconfig $IFACE 0.0.0.0 up
  169. # up ip link set $IFACE promisc on
  170. # down ip link set $IFACE promisc off
  171. # down ifconfig $IFACE down
  172. # Set up an interface which will not be allocated an IP address by
  173. # ifupdown but will be configured through external programs. This
  174. # can be useful to setup interfaces configured through other programs,
  175. # like, for example, PPPOE scripts.
  176. #
  177. # auto eth0
  178. # iface eth0 inet manual
  179. # up ifconfig $IFACE 0.0.0.0 up
  180. # up /usr/local/bin/myconfigscript
  181. # down ifconfig $IFACE down
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement