LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS Lookup problems (https://www.linuxquestions.org/questions/linux-networking-3/dns-lookup-problems-332923/)

SCFan42 06-12-2005 09:50 PM

DNS Lookup problems
 
I've already searched around the forums some and couldn't find an answer unforunately :/
I've been working on a multipurpose Slackware 10.1 (current) server over the weekend, getting Apache, PHP, MySQL, and the firewall up, but I have yet to my mail (Postfix) 100% working. The main reason I haven't got it working because it can't resolve any host names. I've compared the resolv.conf to my desktop system (another Slackware 10.1), and they're identical. The server is set up behind a router using the DMZ feature on the router to forward the ports. Receiving e-mail has worked, and using SMTP to send e-mail has gotten Postfix to try and send it. And whenever I try to dig out to any site (google) it times out. I've also opened port 53 both ways in my firewall, but it doesn't seem to help.

win32sux 06-12-2005 10:02 PM

can you ping the IPs of your DNS servers??

have you configured the gateway address properly (in /etc/rc.d/rc.inet1.conf)??

SCFan42 06-13-2005 09:49 AM

I ping doesn't get out, returns "ping: sendmsg: Operation not permitted" probably because the firewall blocks pings both ways, though my computer can't ping the IPs in resolv.conf either, or at least the pings don't return a response.
My desktop doesn't have a gateway listed and works fine, so I can assume that the server doesn't need it either.

win32sux 06-13-2005 06:05 PM

maybe you should enable PING (icmp type 8) on your firewall so you can do some testing...

if you aren't specifying a gateway address anywhere then you must be using DHCP to obtain your IP configuration and you get your gateway address from there... right??

if you are trying the server with the exact same IP/DNS configuration as your desktop in the exact same port/zone of your router and it doesn't work then i believe it's a fair assumption that the problem lies on the server... maybe check and make sure the iptables rules aren't blocking anything on it??

SCFan42 06-13-2005 11:52 PM

I just tested the firewall changing the default DROP to ACCEPT for a minute, and it seems that dig stops working when INPUT or OUTPUT are set to DROP. Is there a way I can monitor my ports for what's being used? Then I could probably find what ports need opening.

win32sux 06-14-2005 03:50 AM

you can add a LOG rule to the end of your INPUT and OUTPUT chains and then look in /var/log/syslog to see the packets as they get dropped...

but optimally you should know beforehand which ports you need to allow access to... like, for the DNS to work you need to allow 53/UDP in your OUTPUT chain, etc...

SCFan42 06-14-2005 01:44 PM

Alright, I got it working now, thanks for the help.
Turns out that the port changes from source to destination, I had OUTPUT looking for the source port and INPUT looking for the dest port on UDP 53, but that was where the port changed. I swapped it to OUTPUT looking for the dest port and INPUT looking for the source port and it works now.


All times are GMT -5. The time now is 10:02 AM.