惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

Rat's Blog - Haproxy

Haproxy一键安装脚本,可转发端口改善服务器的网络状况 - Rat's Blog Haproxy安装及端口转发配置 - Rat's Blog
使用haprxoy隐藏SMTP发信服务器源IP地址方法 - Rat's Blog
博主: Rat's · 2017-05-23 · via Rat's Blog - Haproxy
  •  发布时间:
  •  15527 次浏览
  •   暂无评论
  •  1352 字数
  • 分类: 主机教程
  1.  首页
  2. 正文  
  3. 分享到:

SMTP发信会暴露网站服务器的IP(即使用了CDN)。如何隐藏服务器源IP呢,可以使用haproxy来端口转发来完成。

方法

1、需要找一台机器做中转,先安装Haproxy,具体可参考Haproxy安装及端口转发配置

2、把下面的内容写入到haproxy.cfg文件中

global
ulimit-n  51200
defaults
log global
mode    tcp
option  dontlognull
timeout connect 1000ms
timeout client 150000ms
timeout server 150000ms
listen status
bind 0.0.0.0:1080
mode http
log global
stats refresh 30s
stats uri /admin?stats
stats realm Private lands
stats auth admin:password
stats hide-version
frontend ssin
bind *:465
#如果是普通模式,那这里就填25,如果是SSL模式,就需要填465
default_backend ssout
backend ssout
server server1 11.22.33.44 maxconn 204800
#这里的IP需要改成SMTP地址的IP,ping一下SMTP域名即可得到地址

3、修改完成后,执行重启命令,并设为开机启动

service haproxy restart
chkconfig haproxy on

4、登录WEB服务器,把smtp地址写进/etc/hosts文件,指向中转服务器的IP。假如我使用的是阿里云的邮件推送,那么它的SMTP服务器域名就是smtpdm.aliyun.com然后编辑/etc/hosts文件

[root@sscloud ~]# vim /etc/hosts
127.0.0.1 localhost
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.16.156.98 sscloud
22.33.44.55  smtpdm.aliyun.com
//22.33.44.55就是中转服务器的IP

修改完成后,执行service network restart重启网卡即可。

原文地址:https://www.gaomingsong.com/537.html


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/131/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。