setting static ip

Transparent Proxy Server with Squid in Ubuntu: 1. Install squid package
# sudo apt-get install squid
2. first backup file squid.conf
# sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.bak
3. Edit  file  squid.conf
# sudo vi /etc/squid/squid.conf
Then you can enter squid configuration according to local network conditions in your place,
The following example of a simple squid configuration file:
http_port 192.168.2.1:3128 transparent
visible_hostname dewalinux
hierarchy_stoplist cgi-bin ?
acl all src 0.0.0.0/0.0.0.0
acl dewalinux src 192.168.2.0/255.255.255.0
http_access allow dewalinux
cache_dir ufs /usr/local/squid/cache 1024 16 256
access_log /usr/local/squid/access.log
cache_log /usr/local/squid/cache.log
cache_store_log none
cache_mem 1024 MB
cache_swap_low 94
cache_swap_high 96
maximum_object_size 16384 KB
minimum_object_size 4 KB
maximum_object_size_in_memory 2048 KB
fqdncache_size 1024
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
hosts_file /etc/hosts
coredump_dir /var/spool/squid
cache_mgr admin@dewalinux
cache_effective_user squid
cache_effective_group squid

4. Creating user and group squid
#sudo adduser squid
5. Make a directory used for Squid
#sudo mkdir /usr/local/squid
6. Creating cache directory
#sudo mkdir /usr/local/squid/cache
7. Making a log cache file which function to monitor activity of client computer
#sudo touch /usr/local/squid/cache.log
8. Making a log cache file which function to monitor activity of server computer
#sudo touch /usr/local/squid/access.log
9. Changing the file permissions on the directory squid
#chown -Rf squid.squid /usr/local/squid
#sudo chown squid.squid /var/spool/squid -Rf
#sudo chown squid.squid -Rf /ec/squid

10. Create cache directory structure, should be as user root
# sudo su
#cd /etc/squid
# squid -z

11. Test squid
#squid -d l -D
12. Running Squid
#squid -sYD
13. Viewing events from client computer
#tail -f/ usr/local/squid/access.log
14. Redirecting http traffic, so that all the requests forwarded through Proxy Server Squid
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.1:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

Thus approximately steps tutorial simple linux needed to build or setting transparent proxy server squid on Ubuntu Server, please try, may be useful.