/danted.conf

http://github.com/brinkman83/bashrc · Config · 271 lines · 226 code · 45 blank · 0 comment · 0 complexity · 7b2f9a7440f47676c6570ad7992d0572 MD5 · raw file

  1. # $Id: sockd.conf,v 1.43 2005/12/26 16:35:26 michaels Exp $
  2. #
  3. # A sample danted.conf
  4. #
  5. #
  6. # The configfile is divided into three parts;
  7. # 1) serversettings
  8. # 2) rules
  9. # 3) routes
  10. #
  11. # The recommended order is:
  12. # Serversettings:
  13. # logoutput
  14. # internal
  15. # external
  16. # method
  17. # clientmethod
  18. # users
  19. # compatibility
  20. # extension
  21. # connecttimeout
  22. # iotimeout
  23. # srchost
  24. #
  25. # Rules:
  26. # client block/pass
  27. # from to
  28. # libwrap
  29. # log
  30. #
  31. # block/pass
  32. # from to
  33. # method
  34. # command
  35. # libwrap
  36. # log
  37. # protocol
  38. # proxyprotocol
  39. #
  40. # Routes:
  41. # the server will log both via syslog, to stdout and to /var/log/lotsoflogs
  42. #logoutput: syslog stdout /var/log/lotsoflogs
  43. logoutput: stderr
  44. # The server will bind to the address 10.1.1.1, port 1080 and will only
  45. # accept connections going to that address.
  46. #internal: 10.1.1.1 port = 1080
  47. # Alternatively, the interface name can be used instead of the address.
  48. #internal: eth0 port = 1080
  49. # all outgoing connections from the server will use the IP address
  50. # 195.168.1.1
  51. #external: 192.168.1.1
  52. # list over acceptable methods, order of preference.
  53. # A method not set here will never be selected.
  54. #
  55. # If the method field is not set in a rule, the global
  56. # method is filled in for that rule.
  57. #
  58. # methods for socks-rules.
  59. #method: username none #rfc931
  60. # methods for client-rules.
  61. #clientmethod: none
  62. #or if you want to allow rfc931 (ident) too
  63. #method: username rfc931 none
  64. #or for PAM authentification
  65. #method: pam
  66. #
  67. # An important section, pay attention.
  68. #
  69. # when doing something that can require privilege, it will use the
  70. # userid:
  71. user.privileged: proxy
  72. # when running as usual, it will use the unprivileged userid of:
  73. user.notprivileged: nobody
  74. # If you compiled with libwrap support, what userid should it use
  75. # when executing your libwrap commands? "libwrap".
  76. user.libwrap: nobody
  77. #
  78. # some options to help clients with compatibility:
  79. #
  80. # when a client connection comes in the socksserver will try to use
  81. # the same port as the client is using, when the socksserver
  82. # goes out on the clients behalf (external: IP address).
  83. # If this option is set, Dante will try to do it for reserved ports aswell.
  84. # This will usually require user.privileged to be set to "root".
  85. #compatibility: sameport
  86. # If you are using the bind extension and have trouble running servers
  87. # via the server, you might try setting this. The consequences of it
  88. # are unknown.
  89. #compatibility: reuseaddr
  90. #
  91. # The Dante server supports some extensions to the socks protocol.
  92. # These require that the socks client implements the same extension and
  93. # can be enabled using the "extension" keyword.
  94. #
  95. # enable the bind extension.
  96. #extension: bind
  97. #
  98. #
  99. # misc options.
  100. #
  101. # how many seconds can pass from when a client connects til it has
  102. # sent us it's request? Adjust according to your network performance
  103. # and methods supported.
  104. #connecttimeout: 30 # on a lan, this should be enough if method is "none".
  105. # how many seconds can the client and it's peer idle without sending
  106. # any data before we dump it? Unless you disable tcp keep-alive for
  107. # some reason, it's probably best to set this to 0, which is
  108. # "forever".
  109. #iotimeout: 0 # or perhaps 86400, for a day.
  110. # do you want to accept connections from addresses without
  111. # dns info? what about addresses having a mismatch in dnsinfo?
  112. #srchost: nounknown nomismatch
  113. #
  114. # The actual rules. There are two kinds and they work at different levels.
  115. #
  116. # The rules prefixed with "client" are checked first and say who is allowed
  117. # and who is not allowed to speak/connect to the server. I.e the
  118. # ip range containing possibly valid clients.
  119. # It is especially important that these only use IP addresses, not hostnames,
  120. # for security reasons.
  121. #
  122. # The rules that do not have a "client" prefix are checked later, when the
  123. # client has sent its request and are used to evaluate the actual
  124. # request.
  125. #
  126. # The "to:" in the "client" context gives the address the connection
  127. # is accepted on, i.e the address the socksserver is listening on, or
  128. # just "0.0.0.0/0" for any address the server is listening on.
  129. #
  130. # The "to:" in the non-"client" context gives the destination of the clients
  131. # socksrequest.
  132. #
  133. # "from:" is the source address in both contexts.
  134. #
  135. # the "client" rules. All our clients come from the net 10.0.0.0/8.
  136. #
  137. # Allow our clients, also provides an example of the port range command.
  138. #client pass {
  139. # from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0
  140. # method: rfc931 # match all idented users that also are in passwordfile
  141. #}
  142. # This is identical to above, but allows clients without a rfc931 (ident)
  143. # too. In practise this means the socksserver will try to get a rfc931
  144. # reply first (the above rule), if that fails, it tries this rule.
  145. #client pass {
  146. # from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0
  147. #}
  148. # drop everyone else as soon as we can and log the connect, they are not
  149. # on our net and have no business connecting to us. This is the default
  150. # but if you give the rule yourself, you can specify details.
  151. #client block {
  152. # from: 0.0.0.0/0 to: 0.0.0.0/0
  153. # log: connect error
  154. #}
  155. # the rules controlling what clients are allowed what requests
  156. #
  157. # you probably don't want people connecting to loopback addresses,
  158. # who knows what could happen then.
  159. #block {
  160. # from: 0.0.0.0/0 to: 127.0.0.0/8
  161. # log: connect error
  162. #}
  163. # the people at the 172.16.0.0/12 are bad, no one should talk to them.
  164. # log the connect request and also provide an example on how to
  165. # interact with libwrap.
  166. #block {
  167. # from: 0.0.0.0/0 to: 172.16.0.0/12
  168. # libwrap: spawn finger @%a
  169. # log: connect error
  170. #}
  171. # unless you need it, you could block any bind requests.
  172. #block {
  173. # from: 0.0.0.0/0 to: 0.0.0.0/0
  174. # command: bind
  175. # log: connect error
  176. #}
  177. # or you might want to allow it, for instance "active" ftp uses it.
  178. # Note that a "bindreply" command must also be allowed, it
  179. # should usually by from "0.0.0.0/0", i.e if a client of yours
  180. # has permission to bind, it will also have permission to accept
  181. # the reply from anywhere.
  182. #pass {
  183. # from: 10.0.0.0/8 to: 0.0.0.0/0
  184. # command: bind
  185. # log: connect error
  186. #}
  187. # some connections expect some sort of "reply", this might be
  188. # the reply to a bind request or it may be the reply to a
  189. # udppacket, since udp is packetbased.
  190. # Note that nothing is done to verify that it's a "genuine" reply,
  191. # that is in general not possible anyway. The below will allow
  192. # all "replies" in to your clients at the 10.0.0.0/8 net.
  193. #pass {
  194. # from: 0.0.0.0/0 to: 10.0.0.0/8
  195. # command: bindreply udpreply
  196. # log: connect error
  197. #}
  198. # pass any http connects to the example.com domain if they
  199. # authenticate with username.
  200. # This matches "example.com" itself and everything ending in ".example.com".
  201. #pass {
  202. # from: 10.0.0.0/8 to: .example.com port = http
  203. # log: connect error
  204. # method: username
  205. #}
  206. # block any other http connects to the example.com domain.
  207. #block {
  208. # from: 0.0.0.0/0 to: .example.com port = http
  209. # log: connect error
  210. #}
  211. # everyone from our internal network, 10.0.0.0/8 is allowed to use
  212. # tcp and udp for everything else.
  213. #pass {
  214. # from: 10.0.0.0/8 to: 0.0.0.0/0
  215. # protocol: tcp udp
  216. #}
  217. # last line, block everyone else. This is the default but if you provide
  218. # one yourself you can specify your own logging/actions
  219. #block {
  220. # from: 0.0.0.0/0 to: 0.0.0.0/0
  221. # log: connect error
  222. #}
  223. # route all http connects via an upstream socks server, aka "server-chaining".
  224. #route {
  225. # from: 10.0.0.0/8 to: 0.0.0.0/0 port = http via: socks.example.net port = socks
  226. #}