Advertisement
Guest User

myconfig

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