mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-22 23:00:57 +08:00
20140729-2 选题
This commit is contained in:
parent
00e387492f
commit
49baf27788
@ -0,0 +1,131 @@
|
||||
10 Useful “Squid Proxy Server” Interview Questions and Answers in Linux
|
||||
================================================================================
|
||||
It’s not only to System Administrator and Network Administrator, who listens the phrase Proxy Server every now and then but we too. Proxy Server is now a corporate culture and is the need of the hour. Proxy server now a days is implemented from small schools, cafeteria to large MNCs. Squid (also known as proxy) is such an application which acts as proxy server and one of the most widely used tool of its kind.
|
||||
|
||||
This Interview article aims at strengthening your base from Interview point on the ground of proxy server and squid.
|
||||
|
||||
![Squid Interview Questions](http://www.tecmint.com/wp-content/uploads/2014/07/Squid-Interview-Questions.png)
|
||||
Squid Interview Questions
|
||||
|
||||
### 1. What do you mean by Proxy Server? What is the use of Proxy Server in Computer Networks? ###
|
||||
|
||||
> **Answer** : A Proxy Server refers to physical machine or Application which acts intermediate between client and resource provider or server. A client seeks for file, page or data from the the proxy server and proxy server manages to get the requested demand of client fulfilled by handling all the complexities in between.
|
||||
|
||||
Proxy servers are the backbone of WWW (World Wide Web). Most of the proxies of today are web proxies. A proxy server handles the complexity in between the Communication of client and Server. Moreover it provides anonymity on the web which simply means your identity and digital footprints are safe. Proxies can be configured to allow which sites client can see and which sites are blocked.
|
||||
|
||||
### 2. What is Squid? ###
|
||||
|
||||
> **Answer** : Squid is an Application software released under GNU/GPL which acts as a proxy server as well as web cache Daemon. Squid primarily supports Protocol like HTTP and FTP however other protocols like HTTPS, SSL,TLS, etc are well supported. The feature web cache Daemon makes web surfing faster by caching web and DNS for frequently visited websites. Squid is known to support all major platforms including Linux, UNIX, Microsoft Windows and Mac.
|
||||
|
||||
### 3. What is the default port of squid and how to change its operating port? ###
|
||||
|
||||
> **Answer** : The default port on which squid runs is 3128. We can change the operating port of squid from default to any custom unused port by editing its configuration file which is located at /etc/squid/squid.conf as suggested below.
|
||||
|
||||
Open ‘/etc/squid/squid.conf’ file and with your choice of editor.
|
||||
|
||||
# nano /etc/squid/squid.conf
|
||||
|
||||
Now change this port to any other unused port. Save the editor and exit.
|
||||
|
||||
http_port 3128
|
||||
|
||||
Restart the squid service as shown below.
|
||||
|
||||
# service squid restart
|
||||
|
||||
### 4. You works for a company the management of which ask you to block certain domains through squid proxy server. What are you going to do? ###
|
||||
|
||||
> **Answer** : Blocking domain is a module which is implemented well in the configuration file. We just need to perform a little manual configuration as suggested below.
|
||||
|
||||
a. Create a file say ‘blacklist’ under directory ‘/etc/squid’.
|
||||
|
||||
# touch /etc/squid/blacklist
|
||||
|
||||
b. Open the file ‘/etc/squid/blacklist’ with nano editor.
|
||||
|
||||
# nano /etc/squid/blacklist
|
||||
|
||||
c. Add all the domains to the file blacklist with one domain per line.
|
||||
|
||||
.facebook.com
|
||||
.twitter.com
|
||||
.gmail.com
|
||||
.yahoo.com
|
||||
...
|
||||
|
||||
d. Save the file and exit. Now open the Squid configuration file from location ‘/etc/squid/squid.conf’.
|
||||
|
||||
# nano /etc/squid/squid.conf
|
||||
|
||||
e. Add the lines below to the Squid configuration file.
|
||||
|
||||
acl BLACKLIST dstdom_regex -i “/etc/squid/blacklist”
|
||||
http_access deny blacklist
|
||||
|
||||
f. Save the configuration file and exit. Restart Squid service to make the changes effective.
|
||||
|
||||
# service squid restart
|
||||
|
||||
### 5. What is Media Range Limitation and partial download in Squid? ###
|
||||
|
||||
> **Answer** : Media Range Limitation is a special feature of squid in which just the required data is requested from the server and not the whole file. This feature is very well implemented in various videos streaming websites like Youtube and Metacafe where a user can click on the middle of progress bar hence whole video need not be fetched except for the requested part.
|
||||
|
||||
The squid’s feature of partial download is implemented well within windows update where downloads are requested in the form of small packets which can be paused. Because of this feature a update downloading windows machine can be restarted without any fear of data loss. Squid makes the Media Range Limitation and Partial Download possible only after storing a copy of whole data in it. Moreover the partial download gets deleted and not cached when user points to another page until Squid is specially configured somehow.
|
||||
|
||||
### 6. What is reverse proxy in squid? ###
|
||||
|
||||
> **Answer** : Reverse proxy is a feature of Squid which is used to accelerate the web surfing for end user. Say the Real server ‘RS’ contains the resource and ‘PS’ is the proxy Server. The client seek some data which is available at RS. It will rely on RS for the specified data for the first time and the copy of that specified data gets stored on PS for configurable amount of time. For every request for that data from now PS becomes the real source. This results in Less traffic, Lesser CPU usages, Lesser web resource utilization and hence lesser load to actual server RS. But RS has no statistics for the total traffic since PS acted as actual server and no Client reached RS. ‘X-Forwarded-For HTTP’ can be used to log the client IP although on RS.
|
||||
|
||||
Technically it is feasible to use single squid server to act both as normal proxy server and reverse proxy server at the same point of time.
|
||||
|
||||
### 7. Since Squid can be used as web-cache Daemon, is it possible to Clear its Cache? How? ###
|
||||
|
||||
> **Answer** : No Doubt! Squid acts as web-cache Daemon which is used to accelerate web surfing still it is possible to clear its cache and that too very easily.
|
||||
|
||||
a. First stop Squid proxy server and delete cache from the location ‘/var/lib/squid/cache’ directory.
|
||||
|
||||
# service squid stop
|
||||
# rm -rf /var/lib/squid/cache/*<
|
||||
|
||||
b. Create Swap directories.
|
||||
|
||||
# squid -z
|
||||
|
||||
### 8. A client approaches you, who is working. They want the web access time be restricted for their children. How will you achieve this scenario? ###
|
||||
|
||||
Say the web access allow time be 4′o clock to 7′o clock in the evening for three hours, sharply form Monday to Friday.
|
||||
|
||||
a. To restrict web access between 4 to 7 from Monday to Friday, open the Squid configuration file.
|
||||
|
||||
# nano /etc/squid/squid.conf
|
||||
|
||||
b. Add the following lines and save the file and exit.
|
||||
|
||||
acl ALLOW_TIME time M T W H F 16:00-19:00
|
||||
shttp_access allow ALLOW_TIME
|
||||
|
||||
c. Restart the Squid Service.
|
||||
|
||||
# service squid restart
|
||||
|
||||
### 9. Squid stores data in which file format? ###
|
||||
|
||||
> **Answer** : Data stored by Squid is in ufs format. Ufs is the old well-known Squid storage format.
|
||||
|
||||
### 10. Where do cache gets stored by squid? ###
|
||||
|
||||
> **Answer** : A squid stores cache in special folder at the location ‘/var/spool/squid’.
|
||||
|
||||
That’s all for now. I’ll be here again with another interesting article soon. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback the comment section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/squid-interview-questions/
|
||||
|
||||
作者:[Avishek Kumar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/avishek/
|
@ -0,0 +1,44 @@
|
||||
How To Easily Install Tor Browser In Ubuntu 14.04 And Linux Mint 17
|
||||
================================================================================
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/Tor_Browser_Ubuntu.jpeg)
|
||||
|
||||
Keeping all the fiasco of [NSA snooping on citizens and governments worldwide][1] in mind, privacy is a growing concern for many. If you too are concerned about your online safety and want to protect yourself from network surveillance, [Tor project][2] is the best option available.
|
||||
|
||||
Tor Project has its own [Tor browser][3] which is based on Firefox and configured to protect users’ privacy and anonymity by using Tor and [Vidalia][4] tools that come bundled with it. Though you can [download Tor browser and install it from the source code][5], we shall see an easier way to install Tor browser in Ubuntu 14.04 and Linux Mint 17.
|
||||
|
||||
### How to install Tor browser in Ubuntu 14.04 and Linux Mint 17 ###
|
||||
|
||||
Thanks to [Webupd8][6], we have a PPA that we can use to install Tor browser in Ubuntu and other Ubuntu based Linux OSes easily (if you are not comfortable installing from source code). Open a terminal (Ctrl+Alt+T) and use the following commands:
|
||||
|
||||
sudo add-apt-repository ppa:webupd8team/tor-browser
|
||||
sudo apt-get update
|
||||
sudo apt-get install tor-browser
|
||||
|
||||
The above PPA should also be valid for Ubuntu 12.04 and other Linux distributions based on it.
|
||||
|
||||
#### Uninstall Tor browser ####
|
||||
|
||||
If you want to uninstall Tor browser, use the following command:
|
||||
|
||||
sudo apt-get remove tor-browser
|
||||
rm -r ~/.tor-browser-en
|
||||
|
||||
I hope this quick test helped you to **easily install Tor browser in Ubuntu 14.04 and Linux Mint 17**. Any questions or suggestions are always welcomed.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/install-tar-browser-ubuntu-linux-mint-17/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/Abhishek/
|
||||
[1]:http://projects.propublica.org/nsa-grid/
|
||||
[2]:https://www.torproject.org/
|
||||
[3]:https://www.torproject.org/projects/torbrowser.html.en
|
||||
[4]:https://www.torproject.org/projects/vidalia.html.en
|
||||
[5]:https://www.torproject.org/projects/torbrowser.html.en#linux
|
||||
[6]:http://www.webupd8.org/
|
@ -0,0 +1,38 @@
|
||||
Linux FAQs with Answers--How to check which fonts are used in a PDF document
|
||||
================================================================================
|
||||
> **Question**: I would like to know what fonts are used or embedded in a PDF file. Is there a Linux tool which can check which fonts are used in a PDF document?
|
||||
|
||||
To check what fonts are included or used in a PDF file, you can use a command-line utility called pdffonts, which is a PDF font analyzer tool. pdffonts is a part of Poppler PDF utilities package.
|
||||
|
||||
### Install PDF Utilities on Linux ###
|
||||
|
||||
To install Poppler on Debian, Ubuntu or Linux Mint:
|
||||
|
||||
$ sudo apt-get install poppler-utils
|
||||
|
||||
To install PDF Utilities on Fedora, CentOS or RHEL:
|
||||
|
||||
$ sudo yum install poppler-utils
|
||||
|
||||
### Check PDF Fonts ###
|
||||
|
||||
**pdffonts** can list all the fonts used in a PDF document. The basic usage of pdffonts is as follows.
|
||||
|
||||
$ pdffonts doc.pdf
|
||||
|
||||
![](https://farm6.staticflickr.com/5592/14527744387_f8bb671955_z.jpg)
|
||||
|
||||
The **pdffonts** tool shows various information about each font used, such as font name/type, or whether or not a font is embedded, etc.
|
||||
|
||||
In case of a multi-page PDF document, you can limit font scanning for a range of pages with "-f" (first page), and "-l" (last page) options. For example, if you want to find out which fonts are used in pages 5-10 of a document, run this:
|
||||
|
||||
$ pdffonts -f 5 -l 10 doc.pdf
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/check-which-fonts-are-used-pdf-document.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,67 @@
|
||||
Use Pushbullet Indicator In Ubuntu To Send Files To Android Or iOS Devices
|
||||
================================================================================
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/Pushbullet_Logog.jpg)
|
||||
|
||||
[Pushbullet][1] is an app available for iOS and Android devices that lets you send files, links, images from your desktop to your mobile device and vice versa. Pushbullet can be used in any OS by installing extensions in Firefox or Chrome.
|
||||
|
||||
If you are not fan of browser extensions and want to use something more of a desktop app for **Pushbullet in Ubuntu 14.04**, you can use **Pushbullet Indicator** developed by [Atareao][2]. Pushbullet Indicator is in development stage at the moment and doesn’t have all the functionality of the official Windows desktop app but it still has enough to get you started.
|
||||
|
||||
### Install Pushbullet Indicator in Ubuntu 14.04 and Linux Mint 17 ###
|
||||
|
||||
Open a terminal and use the following commands:
|
||||
|
||||
sudo add-apt-repository ppa:atareao/atareao
|
||||
sudo apt-get update
|
||||
sudo apt-get install pushbullet-indicator
|
||||
|
||||
The above PPA won’t work on Ubuntu 13.10.
|
||||
|
||||
### Using Pushbullet Indicator in Ubuntu 14.04 and Linux Mint 17 ###
|
||||
|
||||
- Create an account on [Pushbullet][3].
|
||||
- Install the Pushbullet app on your Android or iOS device.
|
||||
- After installing Pushbullet Indicator in Ubuntu or Linux Mint, start it. On the first launch, it will give the option to connect to your Pushbullet account:
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/Pushbullet_Indicator_start.png)
|
||||
|
||||
- Once connected, you should also name your device, from the device tab in the above picture. If you want Pushbullet to autostart at each boot, you can choose it do so by going in preference and turn on the Autostart button (shown in the picture above).
|
||||
- Once you are done with this, you will see the Pushbullet indicator in Unity panel.
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/Use_Pushbullet_indicator_Ubuntu.jpeg)
|
||||
|
||||
- To send something to your smartphone, click on the indicator and select the device (linked to your Pushbullet account). It’s as simple as that.
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/Pushbullet_Indicator_In_Ubuntu.png)
|
||||
|
||||
- You’ll get a notification on the other device of receiving a file. You can access them all from the Pushbullet app.
|
||||
- Android devices can also get notifications for phone calls, text messages and other notifications.
|
||||
- If you send a file from your mobile device to your desktop, you will be notified about it:
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/Pushbulet_Indicator_Notification.jpeg)
|
||||
|
||||
- The files are not automatically saved to a certain directory. To get the file sent from other device, go to Show last push from the indicator menu, it will show you the last push available. Click on it to download the file to a directory of your choice.
|
||||
|
||||
### Install Nautilus extension for Pushbullet: ###
|
||||
|
||||
Alternatively, you can also install Nautilus extension for Pushbullet to send files directly from right click menu. Use the following command:
|
||||
|
||||
sudo apt-get install nautilus-pushbullet
|
||||
|
||||
You’ll have to authenticate it again after restarting.
|
||||
|
||||
Do share your experience with Pushbullet Indicator in comment section. Ciao ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-includes/images/smilies/icon_smile.gif)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/pushbullet-indicator-ubuntu/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/Abhishek/
|
||||
[1]:https://www.pushbullet.com/
|
||||
[2]:http://www.atareao.es/
|
||||
[3]:https://www.pushbullet.com/
|
Loading…
Reference in New Issue
Block a user