LAN proxy server to do with dual-card PC

To solve the problem:

School campus network has a monthly traffic limit of 25G, to use it is stretched. But in the office in addition to the campus network, there is a free internet DIVI, the network is independent of the campus network. But only in the dormitory campus network can be used, and now I want to access free internet DIVI by office computer (PC1) in hostels (PC2).

Solution:

Installed on PC1 dual card, a card access free internet, access to the campus network to another network card, use a proxy software to provide agency PC2

details:

1. First, set the routing table for the two cards on PC1

Use windows power shell to configure, enter route print to view the current routing table

There are two interfaces can be seen that the IP, respectively 166.111.26.201 (card 1) and 172.30.2.22 (card 2), in which the former is connected to the campus network, which is connected to the DIVI.

First is the card 1 Add persistent routes within the campus network , campus network noticed some ip format 166.111.xx, ip format dormitory network is 183.173.64.x, use the following command to add a route for that subnet

route add 166.111.0.0 mask 255.255.0.0 166.111.26.1 -p
route add 183.173.64.0 mask 255.255.248.0 166.111.26.1 -p

Where 166.111.26.1 is the gateway card 1, -p represents the effect of the route permanently.

And then to add a persistent route outside the network card of 2

route add 0.0.0.0 mask 0.0.0.0 172.30.0.1

At this point may still not access the network card by 2, because there is also the routing table from the routing network to access the card 1, there are two routes at the same time, the computer will automatically select the metric lower piece. Then you need to modify the metric of the route, than the value of 2 hops big card line.

Note: Although you can specify the route will add hops in the route, but after some time, it will automatically hop still modify it back.

 

2. Configure the agent software

Installation of a software agent on the PC1, I installed the CCproxy

本机局域网地址选择连接校园网内网的网卡,其他保持不变。

 

3. 在PC2上连上代理

先登录校园网以获得内网的访问权限(PC1也要做同样的事),打开internet选项-连接-局域网设置,将网卡2的地址166.111.26.201和上图对应的端口808填入即可

 

大功告成!接下来就可以在宿舍尽情享用免费网络了。

Guess you like

Origin www.cnblogs.com/CherryWull/p/10993907.html