Wednesday, March 11, 2015

Squid Server Interview Questions And Answers for Linux admin


Q: - On Which port Proxy server work ? Can we change proxy server port ?
By default proxy server runs on 3128 port. yes we can change proxy server port.
vi /etc/squid/squid.conf

http_port 3128
Q: - How to block Some domains by Squid server ?

Make a file
vi /etc/squid/bad_domains
.xxx.com
.abcd.com
.sexy.com
Now make following changes in Squid.conf file
acl BAD_DOMAINS dstdom_regex -i "/etc/squid/bad_domains"
http_access deny BAD_DOMAINS
Q: - How to clear Cache in Squid proxy? 
Firstly stop squid server.
service squid stop
rm -rf /var/lib/squid/cache/*
squid -z
Q: - How to restart squid server ?

service squid restart
Q: - What is the name of main configuration file for Squid server ?

/etc/squid/squid.conf
Q: - How to restrict web access by Time ?

acl MY_TIME time M T W H F 9:00-17:00
http_access allow MY_TIME
Q: - What is Squid ?

SQUID is a webcache and proxy server for Linux and UNIX.
Users configure their web browsers to use the Squid proxy server instead of going to the web directly. The Squid server then checks its web cache for the web information requested by the user. It will return any matching information that finds in its cache, and if not, it will go to the web to find it on behalf of the user. Once it finds the information, it will populate its cache with it and also forward it to the user's web browser. 
Q: - What is location of Cache directories for SQUID ?

/var/spool/squid
Q: - What this command "squid -z" will do ?

This command will create cache directories.
Q: - Explain "maximum_object_size" directive?
It defines maximum size for objects to be stored in the disk.The value are specified in kilobytes, and the default is 4MB.
Q: - Explain "cache_dir" directive?
This is used to define cache directory, its path, type and size.
cache_dir Type Directory-Name Mbytes Level1 Level2
Q: - What is ufs?
ufs is a squid storage format

Friday, March 6, 2015

Differences Between FTP and TFTP

FTP, or File Transfer Protocol, and TFTP, or Trivial File Transfer Protocol, are both methods of file transfer over a network. That is where the similarities end, however. There are some very distinct differences that distinguish FTP from TFTP servers. Read on for a list of key differences.

Security

FTP is an encrypted file transfer system. This means that security measures such as password protection and encryption protect data as it is transferred. TFTP is not an encrypted file transfer system. For this reason, FTP is typically used by businesses.

Memory

When data is transferred between servers, a portion of the computer and server's memories are preoccupied during the transfer. Larger files and encrypted data take up more memory. TFTP is intended for the transfer of smaller files and does not require authentication. TFTP, therefore, requires less memory on a computer and server than FTP does.

Authentication

FTP requires authentication of a user's authority to upload and download files prior to releasing data resting on the server. Once the user is authenticated, the amount of data to which the user can have access is determined and is released simultaneously by FTP. TFTP, on the other hand, actually transfers data from the server directly to computers by breaking it down into manageable pieces that are then transferred sequentially from first to last between the server and a computer. If any piece fails to complete properly, the rest of the information is not sent.

Port Numbers

FTP utilizes TCP port connections. What this means is that it uses two different port numbers to establish two simultaneous connections. One port establishes authentication and controls the release of data based on the credentials of the user. The other port transfers data. TFTP utilizes UDP ports which make only a single connection between the server and user.

FTP is a more secure method of file sharing that makes it a more secure choice for businesses. TFTP is a better solution for those who only need to transfer a small amount of data without the need to protect it. When a request is made to access an FTP server, a session with a beginning and end is initiated. Accessing a TFTP server merely initiates the transfer of shared data.

port no for FTP
20 for Data and 21 for Control

port no for TFTP

69