“UbuntuHelp:DnsmasqPolipoPrivoxy”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/DnsmasqPolipoPrivoxy}} {{Languages|UbuntuHelp:DnsmasqPolipoPrivoxy}} === Notes === <br>Hm. i should do a dnsmasq dns+dhcp thing... another time. <...) |
小 |
||
第4行: | 第4行: | ||
<br>Hm. i should do a dnsmasq dns+dhcp thing... another time. | <br>Hm. i should do a dnsmasq dns+dhcp thing... another time. | ||
<br>This could probably benefit from a 'diy in 30 seconds' feel, which would include a quick 'do this do that' at the top here, more help can got by following links if people need it. Another day :) | <br>This could probably benefit from a 'diy in 30 seconds' feel, which would include a quick 'do this do that' at the top here, more help can got by following links if people need it. Another day :) | ||
− | |||
== 3 proxy services == | == 3 proxy services == | ||
− | |||
=== Asumptions === | === Asumptions === | ||
− | |||
This Howto/walkthrough makes the following asumptions | This Howto/walkthrough makes the following asumptions | ||
− | |||
* The PC in question is acting as a gateway/proxy in some other form for other PCs | * The PC in question is acting as a gateway/proxy in some other form for other PCs | ||
* It has 2 network cards (eth0 and eth1) | * It has 2 network cards (eth0 and eth1) | ||
第18行: | 第14行: | ||
* You want other people to be able to contact you when it breaks. | * You want other people to be able to contact you when it breaks. | ||
* You have read the Howtos for these 3 services | * You have read the Howtos for these 3 services | ||
− | |||
=== Order of configuration === | === Order of configuration === | ||
− | |||
Thats actualy up to you, but I will do them Dnsmasq -> Polipo -> Privoxy. | Thats actualy up to you, but I will do them Dnsmasq -> Polipo -> Privoxy. | ||
It will pay for you to have read the following pages, as I will assume knowlage, and try to just meantion here what is different/important to those pages. | It will pay for you to have read the following pages, as I will assume knowlage, and try to just meantion here what is different/important to those pages. | ||
第26行: | 第20行: | ||
<br>[[UbuntuHelp:Polipo]] | <br>[[UbuntuHelp:Polipo]] | ||
<br>[[UbuntuHelp:Privoxy]] | <br>[[UbuntuHelp:Privoxy]] | ||
− | |||
==== Dnsmasq ==== | ==== Dnsmasq ==== | ||
− | |||
Interestingly, Dnsmasq needs no special configuration as such, you just needs to know about the address lines. These have the layout address=/domain/ip, where domain is a site you want to divert, and ip is the new for the site. This can be used for 3 primary reasons: | Interestingly, Dnsmasq needs no special configuration as such, you just needs to know about the address lines. These have the layout address=/domain/ip, where domain is a site you want to divert, and ip is the new for the site. This can be used for 3 primary reasons: | ||
* Having fun | * Having fun | ||
第36行: | 第28行: | ||
* Redirecting to a more apropriate site | * Redirecting to a more apropriate site | ||
** Redirect google.com to google.com.au -> address=/google.com/216.239.39.104 | ** Redirect google.com to google.com.au -> address=/google.com/216.239.39.104 | ||
− | |||
And as far as adblocking goes, thats dnsmasq's part in it. | And as far as adblocking goes, thats dnsmasq's part in it. | ||
− | |||
==== Polipo ==== | ==== Polipo ==== | ||
− | |||
Polipo plays no part in killing ads and cookies, but it does provide us with caching. As long as you setup Polipo as the [[UbuntuHelp:KarlGoetz/PolipoHowto| link above]] (keeping the default port number), all you have to check is that your listening address is 192.168.0.1, and listening port is 8123. | Polipo plays no part in killing ads and cookies, but it does provide us with caching. As long as you setup Polipo as the [[UbuntuHelp:KarlGoetz/PolipoHowto| link above]] (keeping the default port number), all you have to check is that your listening address is 192.168.0.1, and listening port is 8123. | ||
− | |||
==== Privoxy ==== | ==== Privoxy ==== | ||
− | |||
Privoxy is going to save our eyes many ads... or thats the idea. | Privoxy is going to save our eyes many ads... or thats the idea. | ||
− | |||
It also needs a small change to its configs. Open up the config file | It also needs a small change to its configs. Open up the config file | ||
<pre><nowiki> | <pre><nowiki> | ||
第52行: | 第38行: | ||
</nowiki></pre> | </nowiki></pre> | ||
and jump to ~ line 950. | and jump to ~ line 950. | ||
− | |||
Half your screen should be section 5.1 forwarding, and the other half should be section 5.2 forwarding. | Half your screen should be section 5.1 forwarding, and the other half should be section 5.2 forwarding. | ||
just above 5.2, add the following line: | just above 5.2, add the following line: | ||
第58行: | 第43行: | ||
forward / 192.168.0.1:8123 | forward / 192.168.0.1:8123 | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
By doing this we just told privoxy to ask Polipo for its packages - Polipo just became an upstream proxy. | By doing this we just told privoxy to ask Polipo for its packages - Polipo just became an upstream proxy. | ||
− | |||
Hopefully thats enought to get you started :) | Hopefully thats enought to get you started :) | ||
kk | kk | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 16:48的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
目录
Notes
Hm. i should do a dnsmasq dns+dhcp thing... another time.
This could probably benefit from a 'diy in 30 seconds' feel, which would include a quick 'do this do that' at the top here, more help can got by following links if people need it. Another day :)
3 proxy services
Asumptions
This Howto/walkthrough makes the following asumptions
- The PC in question is acting as a gateway/proxy in some other form for other PCs
- It has 2 network cards (eth0 and eth1)
- Eth0 has the ip 192.168.0.1
- Eth1 has the ip 192.168.1.2
- You want other people using this service :)
- You want other people to be able to contact you when it breaks.
- You have read the Howtos for these 3 services
Order of configuration
Thats actualy up to you, but I will do them Dnsmasq -> Polipo -> Privoxy.
It will pay for you to have read the following pages, as I will assume knowlage, and try to just meantion here what is different/important to those pages.
UbuntuHelp:Dnsmasq
UbuntuHelp:Polipo
UbuntuHelp:Privoxy
Dnsmasq
Interestingly, Dnsmasq needs no special configuration as such, you just needs to know about the address lines. These have the layout address=/domain/ip, where domain is a site you want to divert, and ip is the new for the site. This can be used for 3 primary reasons:
- Having fun
- Redirect apple.com to ubuntulinuxorg -> address=/apple.com/82.211.81.166
- Blocking ads (this is actualy meantioned in the config file)
- Redirect doubleclick.net to 127.0.0.1 -> address=/doubleclick.net/127.0.0.1
- Redirecting to a more apropriate site
- Redirect google.com to google.com.au -> address=/google.com/216.239.39.104
And as far as adblocking goes, thats dnsmasq's part in it.
Polipo
Polipo plays no part in killing ads and cookies, but it does provide us with caching. As long as you setup Polipo as the link above (keeping the default port number), all you have to check is that your listening address is 192.168.0.1, and listening port is 8123.
Privoxy
Privoxy is going to save our eyes many ads... or thats the idea. It also needs a small change to its configs. Open up the config file
sudo vi /etc/privoxy/config
and jump to ~ line 950. Half your screen should be section 5.1 forwarding, and the other half should be section 5.2 forwarding. just above 5.2, add the following line:
forward / 192.168.0.1:8123
By doing this we just told privoxy to ask Polipo for its packages - Polipo just became an upstream proxy. Hopefully thats enought to get you started :) kk