faqe.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <h3>Why ... doesn't work?</h3>
  2. <p><i>Q: Why does nothing work?</i></p>
  3. A: Valid configuration file is required.
  4. <p><i>Q: Why restrictions (redirections, limits, etc) do not work?</i></p>
  5. A: Most probable reasons: 'auth none' or no auth is used. For any ACL based feature one of 'iponly', 'nbname' or 'strong' auths required. Sequence of commands may be invalid. Commands are executed one-by-one and 'proxy', 'tcppm', 'socks' or another service commands must follow valid configuration. Invalid sequence of ACLs. First matching ACL is used (except of internal redirections, see below). If ACL contains at least one records last record is assumed to be 'deny *'.
  6. <p><i>Q: Why doesn't 3proxy work as service under Windows?</i></p>
  7. Possible reasons:
  8. <ul>
  9. <li>'service' command absents in configuration file. Command is required for
  10. 3proxy.exe to behave as system service in 3proxy 0.5.2 and prior.
  11. <li>there are relative paths in configuration file for included files,
  12. log files, etc. Always use absolute paths. For example
  13. $"c:\3proxy\networks.local" instead of $networks.local. For debugging remove
  14. 'service' and 'daemon', log to stdout an try to execute 3proxy from command
  15. line from some different directory (for example from disk root).
  16. <li>SYSTEM account doesn't have access to executable file, configuration files,
  17. log files, etc.
  18. <li>configuration files is not located in default path (3proxy.cfg in same
  19. location with 3proxy.exe). For alternative configuration file location use
  20. <pre>
  21. 3proxy --install full_path_to_configuration_file
  22. </pre>
  23. <li>user has no rights to install or start service
  24. <li>service is already installed and/or started
  25. </ul>
  26. <p><A NAME="INTEXT"><i>Q: Why doesn't internal and external commands work as expected</i></A></li></p>
  27. A: Check your expectations first.
  28. Both internal and external IPs are IPs of the host running 3proxy itself.
  29. This configuration option is usefull in situation 3proxy is running on the
  30. border host with 2 (or more) connections: e.g. LAN and WAN with different IPs
  31. <pre>
  32. LAN connection +-------------+ Internet connection
  33. LAN <-------------->| 3proxy host |<-------------------> INTERNET
  34. ^+-------------+^
  35. | |
  36. Internal IP External IP
  37. </pre>
  38. If 3proxy is used on the host with single connection, both internal and
  39. external are usually same IP.
  40. <br>Internal should exist and be UP on the moment 3proxy is started and
  41. should never be disconnected/DOWN. If this interface is periodically
  42. disconnected (e.g. direct link between 2 hosts), do not specify internal
  43. address or use 0.0.0.0 instead. In this case, if you have 2 or more
  44. interfaces you must use firewall (preferably) or 3proxy ACLs to avoid open
  45. proxy situation.
  46. <br>
  47. External IP (if specified) must exist in the momet 3proxy
  48. serves client request. If external interface is no specified (or 0.0.0.0),
  49. system select external IP. It may be possible to access resources of internal
  50. network, to prevent this use ACLs. In addition, SOCKSv5 will not support BIND
  51. operation, required for incoming connections (this operation is quite rarely
  52. implemented in SOCKSv5 clients and usually is not required). In case of
  53. dynamic address, do not specify external or use external 0.0.0.0 or, if
  54. external address is required, create a script to determine current external
  55. IP and save it to file, and use external "$path_to_file" with "monitor" command
  56. to automatically reload configuration on address change.
  57. <p><i>Q: Why doesn't ODBC loggind work?</i></p>
  58. A: Check you use system DSN.
  59. Check SQL request is valid.
  60. The best way to check is to make file or stdout logging, get SQL request from log file or console and execute this request manually.
  61. Under Unix, you may also want to adjust 'stacksize' parameter.
  62. <p><i>Q: Why doesn't IPv6 work?</i></p>
  63. A: Proxy can not access destination directly over IPv6 if client requests IPv4 address.
  64. To access IPv6 destination, either IPv6 address or hostname must be used in request.
  65. Best solution is to enable option to resolve hostnames via proxy on client side.
  66. <p><i>Q: Why proxy crash on request processing?</a></i></p>
  67. <i>A:</i> default stacksize may be insufficient, if some non-default plugins
  68. are used (e.g. PAM and ODBC on Linux) or if compiled on some platforms with
  69. invalid system defined values (few versionds of FreeBSD on amd64).
  70. Problem can be resolved with 'stacksize' command or '-S' option starting 3proxy 0.8.4.
  71. <p><i>Q: Why doesn't APOP/CRAM-MD5 authentication work with POP3 proxy?</i></p>
  72. A: Any Challenge-response authentication require challenge to be transmitted from server. Pop3p doesn't know which server to use before authentication, it makes it impossible to obtain challenge. You can encrypt your POP3 communications with TLS (i.e. stunnel) or IPSec.
  73. <h3>Redirection to local proxy</h3>
  74. <p><i>Q: What is it for?</i></p>
  75. A: To have control based on request and to have URLs and another protocol specific parameters to be logged.
  76. <p><i>Q: What are restrictions?</i></p>
  77. A: It's hard to redirect services for non-default ports; Internet Explorer supports only SOCKSv4 with no password authentication (Internet Explorer sends username, but not password), for SOCKSv5 only cleartext password authentication is supported.
  78. <p><i>Q: What are advantages?</i></p>
  79. A: You need only to setup SOCKS proxy in browser settings. You can use socksifier, i.e. FreeCAP or SocksCAP with application which is not proxy aware.
  80. <p><i>Q: How to setup?</i></p>
  81. A: You should specify parent proxy with IP of 0.0.0.0 and port 0. Examples:
  82. <pre>
  83. auth iponly
  84. allow * * * 80,8080-8088
  85. parent 1000 http 0.0.0.0 0
  86. allow * * * 80,8080-8088
  87. #redirect ports 80 and 8080-8088 to local HTTP proxy
  88. #Second allow is required, because ACLs are checked
  89. #twice: first time by socks and second by http proxy.
  90. allow * * * 21,2121
  91. parent 1000 ftp 0.0.0.0 0
  92. allow * * * 21,2121
  93. #redirect ports 21 and 2121 to local
  94. #ftp proxy
  95. allow *
  96. #allow rest of connections directly
  97. socks
  98. #now let socks server to start
  99. </pre>
  100. <p><i>Q: How it affects different ACL rules?</i></p>
  101. A: After local redirections rules are applied again to protocol-level request. Redirection rule itself is skipped. It makes it possible to redirect request again on the external proxy depending on request itself.
  102. <pre>
  103. allow * * * 80,8080-8088
  104. parent 1000 http 0.0.0.0 0
  105. #redirect http traffic to internal proxy
  106. allow * * $c:\3proxy\local.nets 80,8080-8088
  107. #allow direct access to local.nets networks
  108. allow * * * 80,8080-8088
  109. parent 1000 http proxy.3proxy.ru 3128
  110. #use parent caching proxy for rest of the networks
  111. allow *
  112. #allow direct connections for rest of socks
  113. #requests
  114. </pre>
  115. <h3>Can I ...?</h3>
  116. <p><i>Q: Is it possible to resolve names through parent proxy?</i></p>
  117. A: Yes, use 'proxy', 'connect+', 'socks4+' or 'socks5+' as parent proxy type.
  118. 3proxy itself requires name resolutions for ACL checks, so, if it's impossible
  119. to resolve names from 3proxy host, use
  120. <pre>
  121. fakeresolve
  122. </pre>
  123. command. Fakeresolve resolves any name to 127.0.0.2.
  124. <p><i>Q: Can I use 3proxy as FTP proxy?</i></p>
  125. A: There are two kinds of FTP proxy supported: FTP over HTTP support (known as FTP proxy inside Internet Explorer, Mozilla and another browsers) and real FTP proxy (usable in Far and different FTP clients). Both are supported in 3proxy: first one as a part of HTTP 'proxy' and second one as 'ftppr'.
  126. <p><i>Q: Can I bind any 3proxy service to non-default port?</i></p>
  127. A: proxy -p8080
  128. <h3>Why so ...?</h3>
  129. <p><i>Q: Why traffic accounting is incomplete? It differs for what my provider (or another accounting application) shows to me?</i></p>
  130. A: 3proxy accounts protocol level traffic. Provider counts channel or IP-level traffic with network and transport headers. In additions, 3proxy doesn't counts DNS resolutions, pings, floods, scans, etc. It makes approx. 10% of difference. That's why you should have 15% reserve if you use 3proxy to limit your traffic. If difference with your provider is significantly above 10% you should look for traffic avoiding proxy server, for example connections through NAT, traffic originated from the host with proxy installed, traffic from server applications, etc.
  131. <p><i>Q: Why configuration is so difficult and non-intuitive?</i></p>
  132. A: Configuration format is created in a way it's easy to parse and matches to internal 3proxy structures. In addition, there are some older things left for compatibility to be cleaned in 3proxy release. And last, I think it's easy and intuitive.
  133. <p><i>Q: Why the code is so difficult and non-intuitive?</i></p>
  134. A: First, I'm not programmer. Second, 3proxy was 'proof of concept' in reply for some conference post. Request was to write proxy server in 100 lines of code. First version of 3proxy had less, with HTTP and SOCKS support and portmappers. Third, there are peoples who want to use 3proxy code in trojans. I don't want to help them. Fourth, the aim is to support different platforms. It's well known - the worse code is, the better it compiles.
  135. <p><i>Q: Why do you use insecure strcpy, sprintf, etc?</i></p>
  136. A: Why not? I try to use insecure function in secure manner. You're welcome to look for vulnerabilities.