Pages

Monday, March 31, 2008

Squid on Linux FC6

Make a simple Proxy server configuration using squid...

Best control over internet access in NAT / Cafe or for home usage on multiple computers..

Here are some steps :
yum -y install squid

Open config file :
vi /etc/squid/squid.conf

Most of setting are done as default + lot of commented advance config

Your squid.conf abstractly looks like :

================================================================
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

#logging details
access_log /var/log/squid/access.log squid

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

acl our_networks src 10.10.10.0/24 172.16.12.0/24
http_access allow our_networks

http_access allow localhost
http_access deny all

http_reply_access allow all

icp_access allow all
coredump_dir /var/spool/squid
================================================================

We can add/remove network series by adding ==>

acl our_networks src 10.10.10.0/24 172.16.12.0/24
http_access allow our_networks


Single IP access can be manipulated acl list

Most important thing is : complete logging. (Not available in case of NAT)
We can monitor it to produce Artificial intenllegence

Now start squid ::::::::
service squid start

Set Proxy server IP & port to browser settings .. its working

Monday, March 10, 2008

Internet on FC6 linux with Airtel GPRS DKU2.0


First, you got to install wvdial if not present on your linux system.( Comes with OS on FC, Redhat and CentOS)

u can try

#yum install wvdial

I used Airtel as GPRS carriers with Nokia N72 phone on Dell D520 Laptop running with FC6 Linux

username & password is taken as service provider. Other setting same as given below

File /etc/wvdial.conf :
[root@ ~]# more /etc/wvdial.conf
[Modem0]
Modem= /dev/ttyACM0
Baud= 115200
SetVolume= 0
DialCommand= ATDT
FlowControl= Hardware(CRTSCTS)
[Dialer gprs]
Username=airtelgprs.com
Password=airtelgprs.com
Phone=*99***1#
Stupid Mode= 1
Inherits= Modem0

[root@mahendra ~]# wvdial gprs
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon Mar 10 21:28:06 2008
--> pid of pppd: 12348
--> Using interface ppp0
--> pppd: s.com
--> pppd: s.com
--> pppd: s.com
--> pppd: s.com
--> local IP address 117.98.48.238
--> pppd: s.com
--> remote IP address 10.6.6.6
--> pppd: s.com
--> primary DNS address 202.56.230.5
--> pppd: s.com
--> secondary DNS address 202.56.240.5
--> pppd: s.com

:) Now you are connected,


[root@ ~]# more /etc/resolv.conf
#airtel gprs access DNS IPs
nameserver 202.56.230.5
nameserver 202.56.240.5


Now check

##ifconfig


add p-t-p IP as default gateway to system using :

route add default gw <-IP->

Dear you can browse internet from your favorite browser.

Enjoy.