Friday, May 29, 2015

How to make a Squid server and apply Rules


Proxy servers operate as an intermediary between a local network and Internet. Requests from local clients for web services can be handled by the proxy server. Squid is a high-performance HTTP and FTP caching proxy server. It is also known as a Web proxy cache. As it stores data from frequently used Web pages and files, it can often give your users the data they need without their systems having to look to the Internet.
So let's begin the tutorial.
Firstly we should install the squid in our linux system.
It's different from each linux dist but here i will get the ubuntu OS for example. And there is no more difference on these steps just browse over internet to know how to install squid to your linux OS.

Ok get the terminal and type
apt-get install squid3

As i said this is for ubuntu. apt-get install will remains as same in other Linux OSs. But dunno about squid.

Then we have to set a static IP to our server. Go to System Settings and Networks. You can change the IP, Gateway, DNS there without bothering of the commands in the terminal.

To check surely the Squid has installed in the system go to etc folder in file system or root. Try to find something like squid. In this case it's "squid3".

Go to the terminal and type

sudo nano /etc/squid3/squid.conf

Using this command we are going to open the squid.conf with nano for editing purpose. 
Then you will see a more than 5000 lines of doc in there.
press ctrl+w and searching menu will appear. type visible_hostname. It will go to the point that phrase exist and when you slowly scroll down you will see under the  default: , after the visible_hostname localhost or something. Give it a desired name or it's better to use your machine host name (type in the terminal hostname and enter.)

Monday, May 18, 2015

What Is A Programmable Logic Controller (PLC)?

What Is A Programmable Logic Controller (PLC)?

 

 What Is A PLC?

PROGRAMMABLE LOGIC CONTROLLER (PLC) is an industrial computer control system that continuously monitors the state of input devices and makes decisions based upon a custom program to control the state of output devices.
Almost any production line, machine function, or process can be greatly enhanced using this type of control system. However, the biggest benefit in using a PLC is the ability to change and replicate the operation or process while collecting and communicating vital information.
Another advantage of a PLC system is that it is modular. That is, you can mix and match the types of Input and Output devices to best suit your application.

 History of PLCs

The first Programmable Logic Controllers were designed and developed by Modicon as a relay re-placer for GM and Landis.
  • These controllers eliminated the need for rewiring and adding additional hardware for each new configuration of logic.
  • The new system drastically increased the functionality of the controls while reducing the cabinet space that housed the logic.
  • The first PLC, model 084, was invented by Dick Morley in 1969
  • The first commercial successful PLC, the 184, was introduced in 1973 and was designed by Michael Greenberg.

How to Install Samba Server on Ubuntu

What is samba?
Samba is an easy way to share files over Linux And Windows environment. Samba is presented by samba.org and is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients.
Installing Samba.
lets update first the repositories.
open a terminal and type the following :
sudo apt-get update
now install samba
sudo apt-get install samba
now lets edit the configuration file of samba, but before that lets backup the initial configuration file.
cd /etc/samba/
sudo mv smb.conf backsmb.conf
Setup public folder:
First we will create the configuration for a share folder accessible from everyone without any user need it

Saturday, May 16, 2015

BAT Tutorial begining











This is a copy paste of a tutorial that posted by someone else i can't remember thanx to him.

Very Basic Batch Tutorial


NOTE!: Whenever something is in quotation marks ("example"), do not include the quotation marks (if you see that you must just type: example)
 

Step 1: So, what is Batch
For those who don't know, a Batch file is a text file containing a series of commands to be executed by Command Prompt (CMD). When a batch file is run, CMD reads the file and executes its commands.

To open your CMD, click START > RUN > type "CMD" > OK
(some of you may need to type "CMD.EXE")
(or you can click START > ALL PROGRAMS > ACCESSORIES > COMMAND PROMPT).
Step 2: Now what?
These are some VERY basic commands you need to know:
(please try out some of these commands in your CMD).

@echo off - This gets rid of that "c:\documents...etc"

echo - This displays a message, (e.g "echo hello" = "hello") because if you type "hello" into CMD it will interpret "hello" as the command

How to create a No-IP DDNS.

Go to https://www.noip.com

Click on the Sign-up button. Then have to do the normal Sign-up procedure. Give the email and remember the password you gave.

Go to your email and activate the account.



Login to your No-IP account.. click Sign-in up corner. Enter your User name or Email, give the password, login.

Go to Hosts / Redirects tab