局域网用ubuntu代理服务器上网

需求环境:

1、局域网中有一台没有限制的ERP服务器(ubuntu 10.04系统:192.168.11.11);

2、一台机器为受限机器(XP系统:192.168.11.20);

3、受限机(XP)想用局域网中没有限制的服务器(ubuntu)来上网。

所以可以将服务器ubuntu做代理服务器,这样被限制的XP机就可以通过它无限制地上网了。


对没有限制的机器:ubuntu 10.04进行配置,安装squid代理软件;

root@ubuntu:~# apt-get install squid

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  php5-gd libmcrypt4 libjs-mootools libt1-5 php5-mcrypt php5-mysql
  libapache2-mod-php5 php5-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  squid-common squid-langpack
Suggested packages:
  squidclient squid-cgi logcheck-database resolvconf winbind
The following NEW packages will be installed:
  squid squid-common squid-langpack
0 upgraded, 3 newly installed, 0 to remove and 193 not upgraded.
Need to get 1,346kB of archives.
After this operation, 8,503kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Fetched 1,346kB in 5s (247kB/s)
Preconfiguring packages ...
Selecting previously deselected package squid-langpack.
(Reading database ... 133556 files and directories currently installed.)
Unpacking squid-langpack (from .../squid-langpack_20100111-1_all.deb) ...
Selecting previously deselected package squid-common.
Unpacking squid-common (from .../squid-common_2.7.STABLE7-1ubuntu12.5_all.deb) .                                                                             ..
Selecting previously deselected package squid.
Unpacking squid (from .../squid_2.7.STABLE7-1ubuntu12.5_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up squid-langpack (20100111-1) ...
Setting up squid-common (2.7.STABLE7-1ubuntu12.5) ...

Setting up squid (2.7.STABLE7-1ubuntu12.5) ...
Creating squid spool directory structure
2013/01/22 22:15:01| Creating Swap Directories

root@ubuntu:~# cd /etc/squid/
root@ubuntu:/etc/squid# vi squid.conf
# add localhost network
acl inside src 192.168.160.0/24

# add http_access inside  

http_access allow inside

root@ubuntu:/etc/squid# service squid start
squid start/running, process 25337

root@ubuntu:~# ifconfig eth0 |grep addr:
          inet addr:192.168.11.11  Bcast:192.168.11.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe67:d63a/64 Scope:Link
root@ubuntu:~# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 202.101.172.46

XP的只设定以下两行即可:

IP地址:192.168.11.20

子网掩码:255.255.255.0

然后修改Internet Explorer:

右键点击“Internet Explorer” --> "属性" --> "连接" --> "局域网设置" --> 勾选 “为LAN 使用代理服务器(这些设置不会应用于拨号或VPN连接)。”此项,并在“地址”框中输入ubuntu的IP地址:192.168.11.11,“端口”里输入: 3128 ,“确定” 后退出即可。

这样,XP就可以通过ubuntu这个代理服务器进行上网了。

对于其它软件,也要找到它们的代理设置选项,输入ubuntu的代理地址及端口即可。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Leekwen

您的鼓励,是我坚持更新的动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值