Troubleshooting Squid Reverse Proxy Server
0 comments 1/07/2010 08:15:00 AM Posted by Meghana M BhombhoreLabels: Proxy Servers, Server Troubleshooting
Step1 : Check Squid is running or not #ps –ef | grep squid This command should give you Five internal dns server running process Two squid demon(squid –D) One unlinked process. If all the mentions process are running fine means, it indicates that your Squid server is running fine. ps -ef | grep squid root 31617 1 0 15:06 ? 00:00:00 /opt/squid/sbin/squid -D squid 31619 31617 0 15:06 ? 00:00:00 (squid) -D squid 31623 31619 0 15:06 ? 00:00:00 (dnsserver) squid 31624 31619 0 15:06 ? 00:00:00 (dnsserver) squid 31625 31619 0 15:06 ? 00:00:00 (dnsserver) squid 31626 31619 0 15:06 ? 00:00:00 (dnsserver) squid 31627 31619 0 15:06 ? 00:00:00 (dnsserver) squid 31628 31619 0 15:06 ? 00:00:00 (unlinkd) Step2 : Check back end server is able to access from your reverse proxy or not? #links web425.example.co.in Step3 : Check system default logs for any suspected activity. #tail –f /var/log/messages Step4 : Check squid access logs, cache logs, store logs if you can able to find any issues #tail –f /opt/squid/var/logs/access.log #tail –f /opt/squid/var/logs/cache.log #tail –f /opt/squid/var/logs/store.log Step5 : Check whether your syntx in squid is fine or not with the following commands /opt/squid/sbin/squid -k check Please comment your thoughts regarding this post:-)
/opt/squid/sbin/squid -k parse
Surendra's DIG Notes
0 comments 11/24/2009 09:39:00 AM Posted by Surendra Kumar AnneLabels: DNS Servers, How-To's, Server Troubleshooting, Tutorials
2. DIG can work on command line or as well in batch mode
3. DIG supports IDN convections too.
4. DIG is more advanced than older tools such as nslookup and host commands.
5. DIG output have so much information than any other tool, such as Question/Answer/Authority sections(which we are going to discuses in this post)
#dig hostname
Example :
[root@ts6741 ~]# dig www.google.com
; <<>> DiG 9.3.3rc2 <<>> www.google.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52434
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
http://www.google.com/. 43200 IN A 200.99.187.2
;; AUTHORITY SECTION:
http://www.google.com/. 43200 IN NS ns2.google.com.
http://www.google.com/. 43200 IN NS ns3.google.com.
http://www.google.com/. 43200 IN NS ns1.google.com.
;; ADDITIONAL SECTION:
ns1.google.com. 43200 IN A 222.54.11.86
ns2.google.com. 43200 IN A 220.225.37.222
ns3.google.com. 43200 IN A 203.199.147.233
;; Query time: 1 msec
;; SERVER: 222.54.11.86#53(222.54.11.86)
;; WHEN: Wed Nov 18 18:31:12 2009
;; MSG SIZE rcvd: 152
[root@ts6741 ~]#
#dig –x ipadd
#dig –x 192.56.78.1
Usage3 : Digging with specified DNS server. Let me put it in this way. My dns server is not working properly and I want to test some server details, for this DIG will allow you to provide a DNS sever so that DIG will get information about the required system from that DNS server. We can provide DNS server by using @ symbol as shown below.
#dig @ns-server hostname
Note : Here in this example my dig will not check /etc/resolve.conf file for default DNS server entry, it will just request details of http://www.google.com/ from a outside world DNS server ie 223.125.43.67
#dig @223.125.43.67 -p 2345 www.google.com
Note:here 223.125.43.67 is the DNS server and port 2345 where that DNS service is running.
Usage6 : To get mail server details
#dig mx www.google.com
Note : This will provied all the mail servers in google.com
Note : This will provide all the Name Server records.
Please comment your thoughts regarding this post:-)
How To Log DNS Server Activity?
0 comments 11/18/2009 05:16:00 AM Posted by Surendra Kumar AnneLabels: DNS Servers, Network Monitoring, Server Troubleshooting
Ans : Sometimes you require DNS server activity to be logged to a file for future reference to analyze the activity on DNS server and whether DNS server is properly resolving accurately or not. rndc is the command to use for DNS server activity logging. Let’s have a look how to log DNS server activity. In order to log DNS server entries just execute below command (you have to do this one as root user)
#rndc querylog
Example output of the clipped log file
bash-2.05b# tail -f /var/log/messages
Nov 18 18:00:16 ns1.abc.in named[29413]: query logging is now on
Nov 18 18:00:18 ns1.abc.in named[29413]: client 194.158.122.34#43071: query: abc.co.in IN MX
Nov 18 18:00:18 ns1.abc.in named[29413]: client 194.158.122.6#43587: query: smtp.abc.co.in IN A
Nov 18 18:00:19 ns1.abc.in named[29413]: client 82.8.211.193#19305: query: MX2.abc.co.in IN A
Nov 18 18:00:20 ns1.abc.in named[29413]: client 200.49.130.26#4111: query: abc.co.in IN MX
Nov 18 18:00:21 ns1.abc.in named[29413]: client 212.24.128.8#46547: query: abc.co.in IN MX
Nov 18 18:00:22 ns1.abc.in named[29413]: client 200.75.51.132#26540: query: MX2.abc.co.in IN A
In order to stop DNS logging activity please execute below command
#rndc querylog
Ans : No, Never try to restart a production DNS server with out prior notice from your higher officials.
Ans : You can use rndc command to update the changes to dns server.
Ans : We can do it by using rndc command
#rndc reload
#rndc refresh.
Server configuration file syntax Checking commands
2 comments 7/01/2009 09:58:00 PM Posted by Surendra Kumar AnneLabels: Advanced Servers, DNS Servers, File Sharing Servers, Mail Servers, Server Troubleshooting, Web Servers
SERVER CONFIGURATION FILE SYNTAX CHECKING COMMANDS.
I have planned to write this post some long time ago, now the time has come to do it.
Basically configuring servers in Linux/*nix include editing of configuration files and saving them. Once editing the files if any syntax error is there and when we start the service they will show some wearied errors which we cant resolve.
For counter attacking this type of issues for each service there will be one command to check this syntax errors before starting of the service/server, I have collected these commands from my experience and from some of my friends. Please feel free to comment on this if you know some other commands so that I will update my post.
SSHD server check for syntax error
=========================
sshd -t
FTP server check for syntax error
=========================
#vsftpd
DNS server check for syntax error
==========================
For checking syntax errors in main configuration file..
#named-checkconf main-config-file
Example:
#named-checkconf named.conf
Syntax OK
#named-checkzone domain zonefile-loc
Example:
#named-checkzone example.com /var/named/chroot/var/named/exaple-zone.frd
SAMBA server check for syntax error
=============================
#testparm
APACHE server check for syntax error
=============================
httpd -t
For virtual hosts
httpd -t -D DUMP_VHOSTS
TCP Wrappers check for syntax error
============================
tcpdchk
tcpdchk -v
Postfox server check for syntax error
============================
postfix check
postfix -vv
LIGHTTPD server check for syntax error
=============================
lighttpd -t -f /etc/lighttpd/lighttpd.conf
Squid server check for syntax error
==========================
squid -k check
squid -k parse
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg