11131 [Solved] pdnsd inside jail for lan - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2010, 10:35
folivora folivora is offline
Junior Member
 
Join Date: Sep 2010
Location: Finland
Posts: 94
Thanks: 7
Thanked 2 Times in 2 Posts
Default pdnsd inside jail for lan

Hello.

I'm running pdnsd in jail environment. When I use nslookup www.google.com <my-isp-dns-add> inside of jail it resolves dns.

But when I try to use pdnsd (nslookup www.google.com <pdns-add->), it can't resolve www.google.com.

It seems that pdnsd can't communicate with my isp's dns-server. Is there some security things which I need to configure in jail, that pdnsd can have access to my isp's dns-servers ?

- Folivora

Last edited by DutchDaemon; October 2nd, 2010 at 19:40. Reason: It's "I", not "i".
Reply With Quote
  #2  
Old October 2nd, 2010, 13:52
folivora folivora is offline
Junior Member
 
Join Date: Sep 2010
Location: Finland
Posts: 94
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Hello again =)

I tested that my isp-dns is reachable from jail also via ping by enabling temp. raw_sockets. I tested my pdnsd.conf outside of the jail environment and it works like a charm. Does anyone have any clue what can cause the problem that pdnsd can't resolve / communicate with my isp's dns-servers. Does it have something to do with loopback interface?

Share you thoughts please.

Cheers

- Folivora
Reply With Quote
  #3  
Old October 2nd, 2010, 14:06
Savagedlight Savagedlight is offline
Member
 
Join Date: Jan 2010
Location: Norway
Posts: 250
Thanks: 32
Thanked 47 Times in 35 Posts
Default

Can you copypaste your jail/network configuration files?
It's hard to offer assistance about networking issues when there's no solid information available.
Reply With Quote
  #4  
Old October 2nd, 2010, 14:13
folivora folivora is offline
Junior Member
 
Join Date: Sep 2010
Location: Finland
Posts: 94
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Here is my jails rc.conf:

Code:
hostname="dns"
ifconfig_em0="inet 192.168.0.4 netmask 255.255.255.255"
defaultrouter="192.168.0.2"
rpcbind_enable="NO"
clear_tmp_enable="YES"
pdnsd_enable="YES"
And here my host-OS rc.conf for the jail.

Code:
#JAIL DNS
jail_dns_rootdir="/usr/jail/dns"
jail_dns_hostname="dns"
jail_dns_exec_start="/usr/local/sbin/pdnsd"
jail_dns_ip="192.168.0.4"
jail_dns_devfs_enable="YES"
I hope that you were meaning these..

- Folivora

Last edited by DutchDaemon; October 2nd, 2010 at 19:40. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #5  
Old October 2nd, 2010, 14:58
Savagedlight Savagedlight is offline
Member
 
Join Date: Jan 2010
Location: Norway
Posts: 250
Thanks: 32
Thanked 47 Times in 35 Posts
Default

Is there any alias on the host listening to ip 192.168.0.4?
Reply With Quote
  #6  
Old October 2nd, 2010, 15:04
folivora folivora is offline
Junior Member
 
Join Date: Sep 2010
Location: Finland
Posts: 94
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Yes there is

Here:
Code:
ifconfig_em0="inet 192.168.0.2 netmask 255.255.255.0"
ifconfig_em0_alias1="inet 192.168.0.4 netmask 255.255.255.255"
I tested this from host-OS

Code:
nslookup 127.0.0.1 192.168.0.4
Server:         192.168.0.4
Address:        192.168.0.4#53

1.0.0.127.in-addr.arpa  name = localhost.
So it seems that it works 25%

- Folivora

Last edited by DutchDaemon; October 2nd, 2010 at 19:41. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #7  
Old October 2nd, 2010, 19:42
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,861
Thanks: 30
Thanked 1,896 Times in 1,338 Posts
Default

The first alias is supposed to be alias0.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Administrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
  #8  
Old October 2nd, 2010, 19:55
folivora folivora is offline
Junior Member
 
Join Date: Sep 2010
Location: Finland
Posts: 94
Thanks: 7
Thanked 2 Times in 2 Posts
Default

@DutchDaemon:

Yep i know, this is my 2nd alias. That is the reason, why it's 1.

I left out alias0 from my posts, so they wont mix up.

- Folivora
Reply With Quote
  #9  
Old October 3rd, 2010, 13:39
folivora folivora is offline
Junior Member
 
Join Date: Sep 2010
Location: Finland
Posts: 94
Thanks: 7
Thanked 2 Times in 2 Posts
Default

This can be marked as solved.

Problem was with pdnsd.conf file.

- Folivora
Reply With Quote
Reply

Tags
dns, jail

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with DTC inside a jail spork Porting New Software 3 July 20th, 2010 07:34
ssmtp not working from inside jail Moe Web & Network Services 21 March 22nd, 2010 00:08
DNS inside jail gpatrick Web & Network Services 0 November 1st, 2009 04:43
[Solved] ports inside a jail and distfiles? wonslung Installation and Maintenance of FreeBSD Ports or Packages 3 June 15th, 2009 23:41
syslog-ng inside jail myha Installing & Upgrading 1 December 23rd, 2008 13:28


All times are GMT +1. The time now is 01:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0