tinyproxy代理配置

匿名 (未验证) 提交于 2019-12-02 23:03:14

生产机处于内网,无法直接访问外网,程序安装和漏洞修复等操作需要进行联网操作;通过在办公网(可访问外网)上设置代理服务器,生产机通过代理由办公网访问外网

  • 系统:ubuntu

  • tinyproxy安装与配置:
    • 安装:apt-get install tinyprox

    • 配置:vim /etc/tinyproxy/tinyproxy.conf:
      参数Port 8888, 对外服务端口
      参数Allow 127.0.0.1,设置允许访问的ip,注释掉可以让任意ip访问

    • 服务启动:service tinyproxy start

  • ϵͳ:linux

  • 配置:vim /etc/profile,添加http,https代理设置

#添加Proxy代理信息(其中username和password根据需要填写,若无则不填写)  http_proxy=http://ip:8888/ https_proxy=http://ip:8888/ export http_proxy  export https_proxy

若设置了用户名和密码则,链接格式为http://username:password@ip:8888/

  • 执行source /etc/profile
  • 重启系统reboot
  • 测试是否配置成功curl www.baidu.com
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!