Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My server name is centos.linux.local. The httpd service is running. I can access the webserver via IP address on the browser 10.0.0.25. But when I type localhost or linux.local or centos.linux.local I get server not found error. Does anyone have any suggestion what I am missing here?
The content of the /etc/hosts file;
[root@centos /]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.25 linux.local
The DNS and named is running also.
[root@centos html]# nslookup centos
Server: 127.0.0.1
Address: 127.0.0.1#53
Reverse lookup Zone file located in /var/named
[root@centos named]# vi linux.local.rr.zone
$ORIGIN 25.0.0.in-addr.arpa.
$TTL 86400
@ IN SOA dns1.linux.local. hostmaster.linux.local. (
2001062501 ;serial
21600 ;refresh after 6 hours
3600 ;retry after 1 hour
604800 ;expire after 1 week
86400) ;minimum TTL 1 day
@ IN NS centos.linux.local.
1 IN PTR centos.linux.local.
2 IN PTR centos.linux.local.
3 IN PTR centos.linux.local.
4 IN PTR centos.linux.local.
Forward looku Zone located in /var/named;
$ORIGIN linux.local.
$TTL 86400
@ IN SOA dns1.linux.local. hostmaster.linux.local. (
2001062501 ;serial
21600 ;refresh after 6 hours
3600 ;retry after 1 hour
604800 ;expire after 1 week
86400) ;minimum TTL 1 day
IN NS dns1.linux.local.
IN MX 10 mail.linux.local.
IN A 10.0.0.25
dns1 IN A 10.0.0.25
centos IN A 10.0.0.25
ftp IN A 10.0.0.25
mail IN CNAME centos
www IN CNAME centos
Here is the iptables information;
[root@centos /]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Here is the content of resolve.conf file;
[root@centos /]# cat /etc/resolv.conf
nameserver 127.0.0.1
search linux.local
My server name is centos.linux.local. The httpd service is running. I can access the webserver via IP address on the browser 10.0.0.25. But when I type localhost or linux.local or centos.linux.local I get server not found error. Does anyone have any suggestion what I am missing here?
Where did you type that text? on what host, using what app .....?
The Linux OS with Apache web server is on a laptop. I am trying to access it from another computer within the same network LAN. Is there any other configurations needed to be done on the router? In my router there is a section for Tertiary DNS. There is another section in my router called port forwarding/port triggering and services to select such as FTP, HTTP, ICUII, IP Phone, Net Meeting, News etc. Do I have to configure this option? Maybe I am off and I need to do something on the Linux box? Thanks
Ok.... sounds like you need to set up that other computer (the one that you are using FF or IE on... for sure IE you are not using on gnu/linux) to use the linux server as its DNS server. Plus enable access to dns service on the linux server.
What is the output (on the guindous computer) of this?
How do you do it? I mean what and where do I configure the server side? Do I need to do something on the client computer also? I want simply to be able to connect to the local LAN Apache web server using domain name instead of typing IP address at the browser url yet I want to be able to have my regular Internet access also. Is it doable? Where to configure DNS service? On the Linux box?
I guess you need to set up your linux server as the DNS server of the guindous client (remember to open access to named on the firewall of the linux server). That should take care of name resolution on the guindous box.
I'm assuming your Linux box's host name is linux and the domain is local (from your hosts file entry).
If so, you've got a number of configuration errors:
your search line in resolv.conf should be:
search local
Your Windows machine's nameservers should be pointing to your Linux box. It appears that you are using DHCP on your router/gateway so you'll have to figure out how to configure that.
Your reverse zone should be:
$ORIGIN 0.0.10.in-addr.arpa.
not
$ORIGIN 25.0.0.in-addr.arpa.
...and also check your named.conf file for the proper matching entry.
In your 'ifcfg-eth0' file, the DOMAIN should be 'local'
Oh, and host names in the forward DNS file should be like 'centos.local'.
That should be a good start....
Last edited by MikeDeltaBrown; 05-12-2015 at 12:48 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.