LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-10-2010, 04:09 AM   #1
def1
LQ Newbie
 
Registered: Nov 2005
Location: NZ
Distribution: Slackware-13
Posts: 18

Rep: Reputation: 0
Slackware mail server + /etc/hosts


All clients on the LAN, have to have their /etc/hosts file edited for my server to resolve their hostnames/LAN ip addresses. Both Windows/Mac/Linux.

That shouldn't be necessary as all other stanzas are correct. If the hosts file is not ammended my maillog shows connect from unknown rip="my_external_address" when in fact it should say connect from "host" rip=192.168.0.20

Not to sure if it is an iptables issue as I have nothing for this configuration.

/etc/hosts file on the server has all required hostnames and ip addresses

Would anyone know why this happens? I originally presumed /etc/hosts on the client machines was unneccessary.
 
Old 05-10-2010, 07:49 AM   #2
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
A simple DNS server (how about BIND ?) + DHCP server pointing the correct DNS IP address to the clients, would solve your problem.

Of course each host would need to have a running DHCP client but that's usually not a problem.
 
Old 05-10-2010, 05:09 PM   #3
def1
LQ Newbie
 
Registered: Nov 2005
Location: NZ
Distribution: Slackware-13
Posts: 18

Original Poster
Rep: Reputation: 0
Was actually going to look into that

Hi sparc86, bind setup was going to be an option if there wasn't another solution, so will look into that.

Thanks
 
Old 05-10-2010, 06:22 PM   #4
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Bind is a good suggestion. Slackware also offers dnsmasq which is simple to setup and well suited for this type of situation.
 
Old 05-10-2010, 06:54 PM   #5
def1
LQ Newbie
 
Registered: Nov 2005
Location: NZ
Distribution: Slackware-13
Posts: 18

Original Poster
Rep: Reputation: 0
Funny you said that chuck56, setting up dnsmasq now and seems to be working, just test it a little.

the missues is away and is complaining she can't connect to the server so hopefully this will fix things for her
 
Old 05-11-2010, 08:02 AM   #6
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
def1, is everything properly working now ?
 
Old 05-11-2010, 03:38 PM   #7
def1
LQ Newbie
 
Registered: Nov 2005
Location: NZ
Distribution: Slackware-13
Posts: 18

Original Poster
Rep: Reputation: 0
Hi Sparc86

Set up dnsmasq and everything seems to be good actually. Except for a laptop which still seems to have our external ip address resloved instead of 192.168.0.54, but as we're not using it much, it should be ok.

But dnsmasq was very simple

Thanks all
 
Old 05-12-2010, 08:27 AM   #8
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
Maybe the laptop has a static IP address setup instead of DHCP? Sounds like that's the problem.
 
Old 05-12-2010, 08:43 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by def1 View Post
Set up dnsmasq and everything seems to be good actually. Except for a laptop which still seems to have our external ip address resloved instead of 192.168.0.54, but as we're not using it much, it should be ok.
Have a look at this thread. The solution may also speed up name resolution on the other machines.
 
Old 05-12-2010, 04:15 PM   #10
def1
LQ Newbie
 
Registered: Nov 2005
Location: NZ
Distribution: Slackware-13
Posts: 18

Original Poster
Rep: Reputation: 0
Hi All,
Yes all clients on the LAN have static addresses. So looking at the thread that catkin kindly posted, I'll edit dnsmasq a little and see what happens.

Once again thanks guys! Much appreciated
 
Old 05-13-2010, 12:48 AM   #11
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
if the DHCP system in dnsmasq doesn't works, you can try using DHCPD itself and use dnsmasq only for dns-cache.

I will copy you my dhcpd.conf (a little modified, because mine was really a little bit more complex thus some specific issues in my network)

Quote:
authoritative;
ddns-update-style interim;


default-lease-time 900;
max-lease-time 9200;
option domain-name-servers 192.168.0.1, 8.8.8.8;



################################
subnet 192.168.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
range 192.168.1.3 192.168.1.60;
}
 
Old 05-13-2010, 04:11 AM   #12
def1
LQ Newbie
 
Registered: Nov 2005
Location: NZ
Distribution: Slackware-13
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks sparc86, have been quite busy, so will test a lot more options. Currently it's looking a little "weak"!!

Once again, appreciate your help!
 
  


Reply



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
Slackware Mail Server Echo8413 Linux - Newbie 1 05-04-2010 02:09 PM
Using /etc/mail/acess to allow certain hosts to send us mail glt Red Hat 4 04-03-2008 01:30 PM
slackware mail server possibilities sullami Slackware 7 11-24-2005 06:46 PM
Slackware Mail Server wwnexc Linux - Software 5 09-14-2005 09:01 PM
mail server on slackware 10 paul_mat Slackware 1 03-13-2005 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:26 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
Open Source Consulting | Domain Registration