LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-11-2006, 07:01 AM   #1
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Rep: Reputation: 15
Unhappy Help in setting up a DNS LAN server


I'm from paraguay, 22 years old, i'm new on linux. so sorry por any erros

recently i intalled fedora core 5 in a pentium 4 machine

i have 2 others with XP and a Hub to connect them.

all have the ip type 192.168.0.0 and the linux is 168.0.1, the others are 0.3. and 0.2

i have make the Samba server works on linux and the XP machines see it and share archives without problems.. but i can't make them to ping the linux machine.. between the XP machines i can ping.. but they don't reach the linux.. and the linux don't ping them.. i thin it's becose i dod't have a DNS server.. i want to make a lan DNS server.. without and internet conection or a IPS DNS Server.. i know it will be easy to make my ISP to be the DNS server..
it's that i'm new on linux and i want to know more about it.

if anyone can help me i will appreciate.

Thanks
 
Old 05-12-2006, 12:24 AM   #2
imagineers7
Member
 
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310

Rep: Reputation: 30
Hi ronin,

There is no need to install / configure dns server just to ping the machines. You said that you have configured a samba server on linux machine and it can be used by $$$$$$$ ms machines.

just see if all of the machines share the same network (subnet) and check if you have configured firewall in such a manner that the server is dropping every packet except for samba
 
Old 05-12-2006, 06:18 AM   #3
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Original Poster
Rep: Reputation: 15
Unhappy

yes.. they are in the same subnet.. the config is this..

Linux
192.168.0.1
255.255.255.0
XP 1
192.168.0.2
255.255.255.0
XP 2
192.168.0.3
255.255.255.0

they don't ping the linux and the linux don't ping them..

i have configured the iptables to accept all, INPUT, OUTPUT and FORWARD..

please.. if anyone can help me..
 
Old 05-12-2006, 07:13 AM   #4
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,263

Rep: Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562
Can you ping by IP addresses? If you can, and since you have a small number of hosts with fixed IP addresses, you can enter the hostnames and IP addresses in the /etc/hosts file on the FC5 box, and the C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS files on the windows boxes.

If you do connect to the internet, you will need to enter the DNS (a.k.a nameserver) address from your ISP in your distro's networking setup. These nameservers wouldn't help you resolve the names of your computers on your lan, they are for resolving the names of hosts on the internet. Assuming you aren't using DHCP, you also need to supply the routers IP address as the default gateway address. If you are using DHCP, this information should be supplied to the DHCP client which makes the changes itself.

Last edited by jschiwal; 05-12-2006 at 01:24 PM.
 
Old 05-13-2006, 01:57 AM   #5
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Hi Ronin,

For a start, your problem has nothing to do with DNS. As you have the network running (Samba works), sounds like you have iptables blocking ICMP (ping). So, open a terminal window and become root. Enter the following 3 commands:

/sbin/iptables -F INPUT
/sbin/iptables -F FORWARD
/sbin/iptables -F OUTPUT

Now, just to make sure everything is reset type:

/sbin/iptables -L

You should see this:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

If you see this, your firewall is now gone. Try to ping 192.168.0.2 -- you should get an answer.

Assuming you do, the problem is with your iptables. Let me know if this works and I will help you with iptables rules that will work and let you add DNS server later.

HTH
 
Old 05-13-2006, 06:22 AM   #6
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Original Poster
Rep: Reputation: 15
Cool Great idea!

Thanks for that.. i never thought that before BSchindler i wll tray now..
 
Old 05-14-2006, 02:43 PM   #7
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Original Poster
Rep: Reputation: 15
Unhappy

i have done a flush of the iptables rules... but nothing..

i have edited the host files of the linux and the xp machines.. nothing..

when i add a route rule in linux like this>

route add -host 192.168.0.3 gw 192.168.0.1 eth0

it automatically put an netmask 255.255.255.255

if i pu this>


route add -host 192.168.0.3 netmask 255.255.255.0 gw 192.168.0.1 eth0

says> the netmask does not make sence whit the ip given...

i lose again...

i added the forward_ipv4=yes on the etc/sysconfig/network file did not make a diference.. i can't ping..
added the line>
net.ipv4.ip_forward = 1 > nothing..

i don't understen whats happening.. why does not work the ping funtion..???

Please someone help me!!!
 
Old 05-14-2006, 03:27 PM   #8
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 30
Quote:
when i add a route rule in linux like this>
Code:
route add -host 192.168.0.3 gw 192.168.0.1 eth0
it automatically put an netmask 255.255.255.255
Thats becuase you are trying to add a host route (-host)

Quote:
if i put this>
Code:
route add -host 192.168.0.3 netmask 255.255.255.0 gw 192.168.0.1 eth0
says> the netmask does not make sence whit the ip given...
Again, because you are trying to add a host route.

If the network address 192.168.0.0/24 does not already exist on your system (netstat -rn), try adding a network route. i.e. route add -net...
 
Old 05-15-2006, 02:30 AM   #9
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
This is NOT a route / gateway issue. You are making it more difficult by going to other areas of the network topology. Route is for going OUTSIDE your network. You are not doing that. Stick with only one thing at a time.

Execute the following command (after restarting your machine AND resetting iptables (as above).

/sbin/ifconfig

What do you see?

You should see a something like this

Code:
eth0      Link encap:Ethernet  HWaddr 00:D0:68:01:B2:D1  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1686490 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1039856 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1618069140 (1543.1 Mb)  TX bytes:260905470 (248.8 Mb)
          Interrupt:11 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6167424 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6167424 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:664970872 (634.1 Mb)  TX bytes:664970872 (634.1 Mb)
What is important is the line in eth0 -- "inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0"

You should see EXACTLY that, the rest will be different.

You MUST have the network interface reporting this. Let me know what happens after you restarted your machine, flushed your iptables, executed the /sbin/ifconfig AND /sbin/route. Post the results here.
 
Old 05-15-2006, 11:20 AM   #10
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Original Poster
Rep: Reputation: 15
Unhappy Specifications

my eth0 an lookback are exactly like you say.

but i don'd know way it does not ping the XP Machines..

i have disable the windows xp firewall but does not work either..

don't know what to do anymore...

This is all the config that i think is ok.. search for errors please..
Code:
[root@tekorei /]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:6E:2D:73:CF
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:6eff:fe2d:73cf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:41 dropped:0 overruns:0 frame:82
          TX packets:472 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:48020 (46.8 KiB)
          Interrupt:17 Base address:0x9800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3090 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3090 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7022136 (6.6 MiB)  TX bytes:7022136 (6.6 MiB)

[root@tekorei /]# route -F -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

[root@tekorei sysconfig]# vi network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=tekorei
GATEWAY=192.168.0.1

[root@tekorei network-scripts]# vi ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.3
NETMASK=255.255.255.0
GATEWAY=192.168.0.1

[root@tekorei network-scripts]# vi ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

[root@tekorei sysconfig]# vi iptables-config
# Load additional iptables modules (nat helpers)
#   Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES="ip_conntrack_netbios_ns"

# Unload modules on restart and stop
#   Value: yes|no,  default: yes
# This option has to be 'yes' to get to a sane state for a firewall
# restart or stop. Only set to 'no' if there are problems unloading netfilter
# modules.
IPTABLES_MODULES_UNLOAD="yes"

# Save current firewall rules on stop.
#   Value: yes|no,  default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets stopped
# (e.g. on system shutdown).
IPTABLES_SAVE_ON_STOP="no"

# Save current firewall rules on restart.
#   Value: yes|no,  default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets
# restarted.
IPTABLES_SAVE_ON_RESTART="no"

# Save (and restore) rule and chain counter.
#   Value: yes|no,  default: no
# Save counters for rules and chains to /etc/sysconfig/iptables if
# 'service iptables save' is called or on stop or restart if SAVE_ON_STOP or
# SAVE_ON_RESTART is enabled.
IPTABLES_SAVE_COUNTER="no"

# Numeric status output
#   Value: yes|no,  default: yes
# Print IP addresses and port numbers in numeric format in the status output.
IPTABLES_STATUS_NUMERIC="yes"

# Verbose status output
#   Value: yes|no,  default: yes
# Print info about the number of packets and bytes plus the "input-" and
# "outputdevice" in the status output.
IPTABLES_STATUS_VERBOSE="no"

# Status output with numbered lines
#   Value: yes|no,  default: yes
# Print a counter/number for every rule in the status output.
IPTABLES_STATUS_LINENUMBERS="yes"

[root@tekorei ~]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.3 icmp_seq=1 Destination Host Unreachable
From 192.168.0.3 icmp_seq=2 Destination Host Unreachable
From 192.168.0.3 icmp_seq=3 Destination Host Unreachable

Last edited by Ronin_tekorei; 05-15-2006 at 06:04 PM. Reason: specification
 
Old 05-15-2006, 06:50 PM   #11
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 30
Your post is confusing. You state in post 1 (and 3) that the linux box is configured with an IP address of 192.168.0.1 and the winders box's are 0.2 and 0.3. But yet ifconfig shows eth0 is configured with an IP address of 192.168.0.3 (the same IP as one of the winders box). I'm surprised you are not seeing a "duplicate ip" error. So based on your last post, it looks like you are trying to ping an address that does not exist.

Try editing ifcfg-eth0 and change IPADDR=192.168.0.1 and see if you have better results after you restart the network. Also, you should change your GATEWAY statement in /etc/sysconfig/network to null or point it to a valid ip address of a gateway device on your network. If you don't have a valid gateway device, then just GATEWAY= will do.

Long pause: Also, remove GATEWAY= statement from ifcfg-eth0. Its not needed.

BTW: When I try to ping a non-existant ip address, I get the same error as you posted.
Code:
[root@excelsior log]# ping 192.168.8.33
PING 192.168.8.33 (192.168.8.33) 56(84) bytes of data.
From 192.168.8.2 icmp_seq=1 Destination Host Unreachable
From 192.168.8.2 icmp_seq=2 Destination Host Unreachable
From 192.168.8.2 icmp_seq=3 Destination Host Unreachable
 
Old 05-16-2006, 06:33 AM   #12
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Original Poster
Rep: Reputation: 15
Smile Information

Sorry, i forget to tell that i change the linux ip, so one of the XP will bet the 0.1 and the linux is te 0.3

just to see if the problem is that the linux or the XP..

can i put in the GATEWAY=null or just erase the line?

i will try to do that, thanks for your help. i will let you know what happend.

Last edited by Ronin_tekorei; 05-16-2006 at 06:45 AM.
 
Old 05-25-2006, 08:40 PM   #13
scottflyer
LQ Newbie
 
Registered: May 2006
Location: Santa Cruz, CA
Distribution: FC5, SuSE 10
Posts: 12

Rep: Reputation: 0
Post GATEWAY= statement in network or ifcfg-eth0

Hi

It was interesting that the GATEWAY= statement was in both network and ifcfg-eth0 in the post. Scowles stated that it should be removed from ifcfg-eth0, yet using the Redhat setup tool, the GATEWAY= statement is populated in the ifcfg-eth0 and not in the network file, even though in other distros it is found in the network file, as I've seen. When I read the post, I added GATEWAY=192.168.0.1 to the network file, but later, after a reboot or two, noticed that it is also in ifcfg-eth0, as it still is, put there previously by Redhat setup. Having it just in ifcfg-eth0 was fine and it seems that the system doesn't care if it is both files, as I'm communicating through the gateway now. Any comments, what is correct, since Redhat's setup (run from cli) puts it in the /etc/sysconfig/network-script/ifcfg-eth0???




Hey Ronin, what happened, is your network fixed??? I didn't see that final post you promised, did you give up?
 
Old 05-26-2006, 10:12 AM   #14
SUBARU
LQ Newbie
 
Registered: May 2006
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by jschiwal
Can you ping by IP addresses? If you can, and since you have a small number of hosts with fixed IP addresses, you can enter the hostnames and IP addresses in the /etc/hosts file on the FC5 box, and the C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS files on the windows boxes.
I got XP and win2000 connect to linux without those modification
 
Old 05-26-2006, 09:42 PM   #15
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
As you are on the same subnet (192.168.0.x) you do not need to concern yourself with the gateway. When you want to route packets/requests outside your subnet you need this. So not an issue here.

So, I suggest that you flush your iptables. To do this (as root) execute the following:

root>/sbin/iptables -P OUTPUT DROP
root>/sbin/iptables -F OUTPUT
root>/sbin/iptables -P INPUT DROP
root>/sbin/iptables -F INPUT
root>/sbin/iptables -P FORWARD DROP
root>/sbin/iptables -F FORWARD
root>/sbin/iptables -F
root>/sbin/iptables -X
root>/sbin/iptables -t nat -F

This should remove ALL iptables rules which may interfere with your ICMP ping. Let me know what happens after you do this. BTW, if ping works after this, next we need to review your firewall rules.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up lan DNS with virtual IP? in2u29 Fedora 1 05-26-2006 09:51 PM
setting up a apache server on lan dipen_linux Linux - Networking 1 06-10-2005 05:03 AM
Advice on setting up VPN/LAN DNS rwalkerphl Linux - Networking 2 10-03-2004 12:32 PM
setting up a LAN server Chypmunk Linux - Networking 1 05-28-2003 03:26 AM
How do you make the ip masquerade server/dhcp server broadcast dns to lan cmisip Linux - Networking 6 01-25-2003 10:43 PM


All times are GMT -5. The time now is 05:29 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration