我在家工作。
我需要访问办公室里的机器。办公室有一个私有局域网(例如192.168.0.0/16),上面有100台机器。我希望能够在家中访问这些机器。
我们在 gateway.example.org 上有一台可用的 SSH 堡垒(SSH 网关)主机,我们可以将其用于 SSH 隧道。
这就是我想做的:
我可以使用 SSH 转发或代理来执行此操作吗?
我可以在 Linux/Unix 上使用带有 SSH动态端口转发和 OpenSSH 的 SOCKS 代理(PuTTY 支持类似的功能):
ssh -v -D 3333 gateway.example.org.
Run Code Online (Sandbox Code Playgroud)
但这仅适用于网络浏览器和其他一些支持 SOCKS 的应用程序。
我还想强制一些其他流量(VNC 端口 5900/5901)通过代理。特别是,我试图弄清楚如何让 Dell DRAC 和应用程序以及 Supermicro IPMI KVM-over-LAN 通过此 SSH 隧道工作。
我目前正在使用 Mac(雪豹)笔记本电脑,尽管我正在寻找可在多个操作系统上运行的更通用的网络概念。
抱歉我的术语我不是代理专家。
我需要做的是在一侧有一个非常简单的 HTTP(S) 代理,无需任何客户端身份验证(这样客户端就不需要提供用户名/密码来连接它),而这个代理需要将所有内容重定向到下一个“真正的”代理,它会发挥其魔力。
也许有人可以给我指出正确的方向 - 也许只需几行 Squid 配置(只是为了了解要寻找什么)也可以被接受作为答案。
我们运行 apache 作为代理服务器,并且在 apache 后面有 tomcat。我们正在使用 server_status 模块,但是当我们尝试访问 server_status 时,https://host.com/server-status它会重定向到 tomcat,并收到 404 错误。我对此很陌生,尝试浏览 apache 文档但无法找出解决方案。仅供参考。我们已启用 ssl
当前 ssl.conf 设置:
ProxyRequests Off
ProxyPreserveHost On
<Proxy http://localhost:8081/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
ProxyPassReverse / http://myhost:8081/
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 10.90
</Location>
Run Code Online (Sandbox Code Playgroud)
建议更改后
ProxyRequests Off
ProxyPreserveHost On
<Proxy http://localhost:8081/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /server-status !
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
ProxyPassReverse / http://myhost:8081/ …Run Code Online (Sandbox Code Playgroud) 我正在寻找(免费)非常简单的支持 SSL 的反向代理解决方案(应用程序)。
我尝试了 Charles,它效果很好,但它太复杂而且不是免费的。
我有一个小服务,仅侦听 localhost:4952 并检查源主机名。使用反向代理,我可以将请求重定向到 4952 端口:
https://92.168.1.10:1988 (SSL) -> 重定向https://localhost:4952 (SSL)
我在 Apache 2.4 服务器前面使用 nginx 作为 TLS 终止符。
我add_header X-Content-Type-Options nosniff;在 nginx 中使用此标头添加到每个响应中。
如果 Apache 返回的 HTTP 状态代码低于 400,则标头设置正确,但如果状态大于或等于 400,则标头被忽略。
gzip 模块也是如此。如果状态代码低于 500,gzip 模块会自动压缩响应正文。但是,如果 Apache 获取的 HTTP 状态代码大于或等于 500,则 gzip 模块将不执行任何操作。
我的 nginx 配置的一些相关部分:
proxy_intercept_errors off;
proxy_ignore_client_abort off;
proxy_http_version 1.1;
proxy_hide_header X-Powered-By;
proxy_set_header Connection ""; #for keepalive to backend
add_header X-Content-Type-Options nosniff;
### gzip ###
gzip on;
gzip_min_length 20; #default: 20
gzip_comp_level 9;
gzip_proxied any;
gzip_vary on;
gzip_types *;
gunzip on;
Run Code Online (Sandbox Code Playgroud)
我可以采取什么措施来停用此行为并将标头添加到 HTTP 错误响应甚至 gzip HTTP 500 响应中?
我在 Linux 机器上运行启用了网关的 CNTLM。同一网络上的许多其他计算机都配置为使用它作为代理。
我在Ubuntu中搜索cntlm.log并没有找到这样的文件。
我怎么能看到通过 CNTLM 发出的所有请求的日志(拦截请求)?
我有一个简单的 Nginx 代理 Docker 容器侦听端口 80。这是 Dockerfile:
FROM centos:7
MAINTAINER Brian Ogden
# Not currently being used but may come in handy
ARG ENVIRONMENT
RUN yum -y update && \
yum clean all && \
yum -y install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm \
yum -y makecache && \
yum -y install nginx-1.12.0 wget
# Cleanup some default NGINX configuration files we don’t need
RUN rm -f /etc/nginx/conf.d/default.conf
COPY /conf/proxy.conf /etc/nginx/conf.d/proxy.conf
COPY /conf/nginx.conf /etc/nginx/nginx.conf
CMD ["nginx"]
Run Code Online (Sandbox Code Playgroud)
对于这个 Nginx 代理,这里是我的 nginx.conf:
daemon off; …Run Code Online (Sandbox Code Playgroud) 我们有一个场景,我有两个在虚拟机中运行的应用程序。它们都将在端口 80/443 上提供流量,但使用不同的主机名。其中一个容器是供应商提供的,它们将解密容器内的 HTTPS 流量。
我是否可以配置 NGINX(或其他工具)以根据目标主机名(可能通过 SNI)将流量路由到某个 VM,而无需解密代理中的数据包?
例如:
myapp1.example.com:443 -> NGINX -> 10.0.0.1:8443(在 VM 上终止 HTTPS) vendor1.example.com:443 -> NGINX -> 10.0.0.1:9443(在 VM 上终止 HTTPS)
我在用 Apache 2.2.22
中的 Keepalive 指令之间有什么区别(如果有) /etc/apache2/apache2.conf
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
Run Code Online (Sandbox Code Playgroud)
以及/sites-enabled使用 ProxyPass 时配置中的指令
ProxyPass / http://localhost:8080/app/ connectiontimeout=28800 timeout=28800 Keepalive=On
Run Code Online (Sandbox Code Playgroud) 因此,我想将 proxy_pass 请求发送到 https 后端服务器,但是,每次尝试使用 https:// 配置的后端重新加载 nginx 服务器时,都会出现以下错误:
nginx: [emerg] https protocol requires SSL support
Run Code Online (Sandbox Code Playgroud)
这是nginx配置
server{
listen 8080;
root /opt/nginx_1.17.0/nginx_ok/html;
server_name www.frontedndomain.com;
index index.php index.html;
location /health-monitor/ {
add_header Custom-Header test;
}
location ~* ^\/([a-z][a-z]\/)?abc\/?(.*)? {
error_log /opt/nginx_1.17.0/nginx_ok/logs/proxy_error.log;
add_header X-query-string $is_args$query_string;
resolver 0.0.0.0;
resolver_timeout 15s;
proxy_pass https://backenddomain.com;
proxy_ssl on;
proxy_http_version 1.1;
proxy_set_header Accept-Encoding "";
proxy_set_header Cache-Control no-cache;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Real-IP $remote_addr;
subs_filter_types *;
}
}
Run Code Online (Sandbox Code Playgroud)
最初我已经为源构建了 nginx,这是 nginx -V 的输出
nginx 版本:由 gcc …