⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transproxy.txt

📁 Stunnel是一个开源的软件
💻 TXT
字号:
Transparent proxying support:(With much thanks to Bernd Eckenfels, who has been maintaing redir fordebian, and pointed out to me that this could be done at all.)Most semi-recent versions of the linux kernel have an option which canbe used with IP firewalls entitled "transparent proxying".  Basically,it allows one to add rules with ipfwadm/ipchains which will redirect allconnections to certain hosts, on certain ports, to a port on thefirewall machine.A convenient upshot of this feature is that, when it is enabled, aprogram running as root may explicitly specify the outgoing address tobe used when making a connection to just about anything it pleases,which allows us to, when redirecting a connection, make the connectionto the destination machine appear as if it were coming from the systemwhich connected to redir.  Also quite convenient is the fact that theprogram doing this does not actually have to be run using transparentproxy firewalling rules, it simply has to be compiled into the kernel.The net effect of it all is the --transproxy flag, which will use thisto make connections "look right" in terms of their originating IP, aslong as redir is running on a linux system with this feature compiledinto its kernel.  (please don't ask me about kernel compiling issues,unless you're sure you have this option turned on, your kernel isotherwise installed/working correctly, and --transproxy isn'toperating)Note the following side effects:1) Use of --transproxy will cause the --bind-addr option to have no   effect.  Not really a problem, as using them together wouldn't make   any sense in the first place.2) For redirection with --transproxy to work at all, the connection to   redir must pass through the firewall.  The following example should   illustrate this:   Let's say that there's a firewall machine running with the internal   IP 10.0.0.1, and a netmask of 255.0.0.0 (that is, inside network is   considered to encompass the entire 10.0.0.0 network).  All machines   inside the network are configured to use 10.0.0.1 as their gateway   address. We want to redirect all connections to the firewall on port    2323 to port 23 on 10.0.0.2, and we'd like to use --transproxy, so we run:   redir --transproxy 10.0.0.2 23 2323   Case 1: Connection from the outside world.   Let's say someone at address 111.111.111.111 telnets to port 2323,   on the external ip address of the firewall machine.  Now, as all   traffic from inside the firewall to 111.111.111.111 must always   pass through the firewall, in any situation, this will work.   Case 2: Connection from somewhere on the internal network.   Now, someone at 10.0.0.3 wants to connect to the same service, but,   rather than telnetting to port 23 on 10.0.0.2, they've telnetted to   the port 2323 on 10.0.0.1 (or the external IP of the firewall,   doesn't matter).  This won't work.  This is because when the   destination machine (10.0.0.2) saw the connection appearing to come   from 10.0.0.3, it then expects the real 10.0.0.3 to be talking to   it, which is, in fact not the case.  By contrast, in case 1,   10.0.0.2, regardless of the external address, expected these   packets to come from the gateway host, which was, in fact, the   case.  For this reason, internal hosts will be unable to make   connections through a redir running with --transproxy enabled.This cannot properly be fixed by redir itself, as far as I can tell,except for using a workaround which would examine the system's routingtables, and then disable the effects of --transproxy when a connectionis made from a host in the same routing block as redir's destination.This doesn't sound particularly worthwhile, given that there's no needfor an internal machine to hit the redirector at all.  Patches will beaccepted from someone who bothers to do it, however.Hopefully, you now have a clear understanding of how to use thisfeature.  Questions can be directed to sammy@users.qual.net.-- Sam Creasey (11/2/98)   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -