LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2013, 11:11 PM   #16
varan
LQ Newbie
 
Registered: Sep 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled

yes i want to use centos as a router first then i will move to squid and my network scenario is same as i told you in my last reply so let me know how i will use as a router my centos and if i will be successful then i will move on to squid i just want to take knowledge from begining.
 
Old 05-23-2013, 03:50 AM   #17
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well as previously stated, routing isn't related to dhcp or DNS either. can you ping an IP on the other side of that box? If so, routing is working.
 
Old 05-30-2013, 12:11 AM   #18
varan
LQ Newbie
 
Registered: Sep 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
thnx alot for reply ok i am configuring squid and same scenario will be
eth0=internet
eth1=lan
how will i divert my lan traffic coming from eth1 to eth0 so they will browse inernet through my squid
 
Old 05-30-2013, 12:12 AM   #19
varan
LQ Newbie
 
Registered: Sep 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
yes i can ping my server IP from my client but internet is still not browsing from client
 
Old 05-30-2013, 03:57 AM   #20
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
I didn't say the server IP, i said an IP on the other side of the box. You have set the server IP as the default route for the client, right?

And yet again, as for squid, this has NOTHING to do with squid.
 
Old 06-20-2013, 02:09 AM   #21
varan
LQ Newbie
 
Registered: Sep 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
i have configured my dns as follows but error on it when i run command
[root@first ~]# service named restart
Stopping named: [ OK ]
Starting named: [FAILED]

my named.conf is as under

//
// Sample named.conf BIND DNS server 'named' configuration file
// for the Red Hat BIND distribution.
//
// See the BIND Administrator's Reference Manual (ARM) for details, in:
// file:///usr/share/doc/bind-*/arm/Bv9ARM.html
// Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
// its manual.
//
options
{
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;

// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";

};
logging
{
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
//
// All BIND 9 zones are in a "view", which allow different zones to be served
// to different types of client addresses, and for options to be set for groups
// of zones.
//
// By default, if named.conf contains no "view" clauses, all zones are in the
// "default" view, which matches all clients.
//
// If named.conf contains any "view" clause, then all zones MUST be in a view;
// so it is recommended to start off using views to avoid having to restructure
// your configuration files in the future.
//
view "localhost_resolver"
{
/* This view sets up named to be a localhost resolver ( caching only nameserver ).
* If all you want is a caching-only nameserver, then you need only define this view:
*/
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
# all views must contain the root hints zone:
//include "/etc/named.root.hints";

/* these are zones that contain definitions for all the localhost
* names and addresses, as recommended in RFC1912 - these names should
* ONLY be served to localhost clients:
*/
include "/etc/named.rfc1912.zones";
};
view "internal"
{
/* This view will contain zones you want to serve only to "internal" clients
that connect via your directly attached LAN interfaces - "localnets" .
*/
match-clients { localnets; };
match-destinations { localnets; };
recursion yes;
// all views must contain the root hints zone:
include "/etc/named.root.hints";

// include "named.rfc1912.zones";
// you should not serve your rfc1912 names to non-localhost clients.

// These are your "authoritative" internal zones, and would probably
// also be included in the "localhost_resolver" view above :

zone "try.com" {
type master;
file "try.com-internal.db";
};
//zone "my.slave.internal.zone" {
//type slave;
//file "slaves/my.slave.internal.zone.db";
//masters { /* put master nameserver IPs here */ 127.0.0.1; } ;
// put slave zones in the slaves/ directory so named can update them
};
//zone "my.ddns.internal.zone" {
//type master;
//allow-update { key ddns_key; };
//file "slaves/my.ddns.internal.zone.db";
// put dynamically updateable zones in the slaves/ directory so named can update them


/*key ddns_key
{
algorithm hmac-md5;
secret "use /usr/sbin/dns-keygen to generate TSIG keys";
};*/
view "external"
{
/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/
match-clients { any; };
match-destinations { any; };

recursion no;
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers

allow-query-cache { none; };
// Disable lookups for any cached data and root hints

// all views must contain the root hints zone:
include "/etc/named.root.hints";

// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:

zone "try.com" {
type master;
file "try.com-external.db";
};
};





my log files are as
Jun 20 16:01:14 first named[14941]: starting BIND 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6 -u named -t /var/named/chroot
Jun 20 16:01:14 first named[14941]: adjusted limit on open files from 1024 to 1048576
Jun 20 16:01:14 first named[14941]: found 1 CPU, using 1 worker thread
Jun 20 16:01:14 first named[14941]: using up to 4096 sockets
Jun 20 16:01:14 first named[14941]: loading configuration from '/etc/named.conf'
Jun 20 16:01:14 first named[14941]: using default UDP/IPv4 port range: [1024, 65535]
Jun 20 16:01:14 first named[14941]: using default UDP/IPv6 port range: [1024, 65535]
Jun 20 16:01:14 first named[14941]: no IPv6 interfaces found
Jun 20 16:01:14 first named[14941]: listening on IPv4 interface lo, 127.0.0.1#53
Jun 20 16:01:14 first named[14941]: listening on IPv4 interface eth0, 150.150.61.61#53
Jun 20 16:01:14 first named[14941]: listening on IPv4 interface eth1, 10.10.10.10#53
Jun 20 16:01:14 first named[14941]: could not configure root hints from 'named.root': file not found
Jun 20 16:01:14 first named[14941]: loading configuration: file not found
Jun 20 16:01:14 first named[14941]: exiting (due to fatal error)



please help me out

Last edited by varan; 06-20-2013 at 02:10 AM.
 
Old 06-20-2013, 03:49 AM   #22
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
did you even READ those error messages? Not sure what else I could possibly add after...

Quote:
Jun 20 16:01:14 first named[14941]: could not configure root hints from 'named.root': file not found
 
Old 06-20-2013, 06:35 AM   #23
varan
LQ Newbie
 
Registered: Sep 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
from above scenario how will i make named.root.hints mean how will i resolve this problem
 
Old 06-20-2013, 07:00 AM   #24
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
For one, you could just google it, and you'd have fixed your own issue yourself hours ago. Obviously we're here to help, but there's so much information out there already, it hurts when people don't seem to try to find it themselves first!

If you need to create a root hints file you just query a root server for it's NS records:

dig +bufsize=1200 +norec NS . @a.root-servers.net > /var/named/named.root

or just find an existing one online.
 
Old 06-21-2013, 05:38 AM   #25
varan
LQ Newbie
 
Registered: Sep 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thnx alot for helping information
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 5.2 and squid collieman Linux - Server 2 07-12-2012 03:00 PM
Squid Proxy in CentOS hans_bug Linux - Newbie 8 05-31-2011 09:03 PM
Squid Configuration for Centos 5.5 gambitsquid Linux - Newbie 2 09-20-2010 05:47 AM
WHich squid for CentOS? qwertyjjj Linux - Server 12 08-04-2009 11:52 AM
Compiling Squid wennie Linux - Software 2 12-11-2004 08:49 AM


All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration