Open jschroer opened 3 years ago
Hi, before discussion goes in the wrong direction: I know that whitelistening will be easier by use server_name for it, the construct above was more flexible for me because I have a bigger tool by regex, and it was not the point, I search for an solution for whitelistening depending of the IP of the target in the connect-line.
Hi, I try to move from squid to nginx as forward proxy. Everything is working fine, this is a great module! In squid we have an whitelist model, so as default anything is deny, only whitelisted targets are allowed. This whitelisting is based on FQDN OR IP. The fqdn part is no problem, I have configured something like this:
`server { listen 3128;
`
The problem is the IP part. In squid we have configured many servers to allow only traffic to specific IP (or networks) and i find no way to make something in this way here. As written in docu $connect_addr is not set at this point . Has someone an idea how this can be done within nginx (or module)? Configuration, reqriting, LUA, modify module (Don't find the correct point, thinking of making a pre resolve) ..., any idea?
Regards Jochen