Linux 服务器代理 上网
Linux 服务 一键安装服务代理上网
yum install squid -y
- 安装完成之后,配置配置文件,可以使用下面的配置文件
/etc/squid/squid.conf
更改http_port 0.0.0.0:3128为代理端口
#
# Recommended minimum configuration:
## Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machinesacl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl SSL_ports port 80
acl SSL_ports port 8445
acl Safe_ports port 8445
acl CONNECT method CONNECT#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager # We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
# # Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost# And finally deny all other access to this proxy
http_access deny all# Squid normally listens to port 3128
#http_port 3128
http_port 0.0.0.0:3128# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid#
# Add any of your own refresh_pattern entries above these.
#
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320#aadd#cache_mem 128MB
#maximum_object_size 16MB
#cache_dir ufs /var/spoolsquid 100 16 256
#access_log /var/log/squid/access.log
#visible_hostname www.test.com
#cache_mgr 123@qq.com
window,可以使用谷歌浏览器,然后搜索代理
然后点开代理,将刚刚配置的服务器ip跟端口配置上即可,实现连通上网
Linux 服务器代理 上网相关推荐
- Linux做代理上网服务器
Linux做代理上网服务器--送给那些想用Linux做网吧代理上网服务器的朋友 首先声明,会这个的老鸟不用看,我这只是给新手看的 首先安装好Linux,准备一台有两块网卡的服务器,一网卡接内网,另一网 ...
- linux下代理上网设置
第一种情况是ISA服务器代理的设置 ubuntu12.04环境 ,如果公司用的是isa服务器,可能设置就稍微有些麻烦了,起初我也是在网络上查找了很久,终于找出了正确的方法: 浏览器上网就不用说了,直接 ...
- Linux系统代理上网
本人在局域网内工作,最头疼的事儿就是下载安装包,各种依赖,一个个的手动下载,那简直了~~~ 好歹我也是个IT屌丝,岂能被这种事儿给难住?吃了一顿百度大餐以后,问题没有解决!! 网上大部分文章都提到了两 ...
- linux服务器---代理认证
代理认证 proxy代理服务被广泛的使用,为了安全起见,可以在服务器上增加一层安全认证机制.这里使用htpasswd建立认证账号和密码 1.创建认证账号和密码 [root@localhost wj]# ...
- linux服务器科学上网,开源一年,openGauss诠释什么是快速成长
Photo by Emily Morter on Unsplash 文/老鱼 中国开源史,比大多数人想象的都要早. 1991年,"中国 Linux 第一人"宫敏博士用手提肩扛的方式 ...
- linux 设置代理上网
11 Linux下常用程序的代理服务器(proxy)配置 Linux下有很多程序都只有命令行接口,对于这类程序,它们通过代理服务器(proxy)访问网络的方式也不尽相同.在本文中Easwy总结了一些常 ...
- 飞腾服务器代理上网设置
1.全局的代理设置: vi /etc/profile http_proxy = http://Kming:1qaz2ws@192.168.8.5:8080/ ftp_proxy = http://Km ...
- Proxy—Linux服务器代理
proxy代理服务器的作用是, 客户端和服务器连接,意思就是客户端想要访问我服务器,需要连接proxy进行通信,proxy负责将消息转发给其他服务器,而这些其他服务器相对于客户端是不可见的,客户端只知 ...
- Linux设置代理上网
echo "export http_proxy=http://ip:port" >> /etc/profile echo "export https_prox ...
最新文章
- android逆向分析概述_Android存储概述
- 计算机专业西电和大工怎么选,放弃985大连理工,选择211西安电子科大,其实很多人都错了...
- C#: static关键字的作用
- AI和机器学习如何改善用户体验?
- c 普通的文本变成注释文本的快捷键_收藏了!IntelliJ IDEA 2019 快捷键开发手册
- stm32超声波测距代码_干货!特斯拉Autopilot核心传感器解读超声波雷达篇
- C# dynamic 类型用法举例
- 旧版eclipse安装maven_厉害!Eclipse 已经开始可以支持 Java 14~
- BZOJ5249:[九省联考2018]IIIDX——题解
- 【数学建模】基于matlab GUI排队系统仿真【含Matlab源码 1253期】
- 直接选择排序——C语言实现
- Windows10 桌面显示“我的电脑”
- Jvm面试题总结及答案 300道(2022年最新版 )
- 百度风云榜实时热点API
- 基于ANSYS WORKBENCH的装配体分析
- Java实现微信小程序支付(支付,提现,退款)
- 解决Java运行时错误For input string:问题
- 验证与github是否连接成功.
- 利用C语言写的简易订餐系统
- JavaScript 分页算法