LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-04-2003, 12:26 PM   #1
importboy03
Member
 
Registered: Feb 2003
Location: NorthEast
Distribution: RH 8.0
Posts: 34

Rep: Reputation: 15
how to open port 53 (DNS)?


my machine doesn't seems to accept incoming DNS service. I think it's the Redhat8.0 firewall. Is there a command to open the DNS port?
 
Old 02-04-2003, 05:54 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Small misconception, np.
A port is opened when an application requests a network connection.
So, to have UPD/53 "opened" you would need for instance to start named, the DNS server. You don't want that cuz you don't want to provide DNS records to other ppl.
What you want is some fw rules:

# Allow UDP packets in for DNS client from nameservers.
iptables -A INPUT -i $IFACE -p udp -s $NAMESERVER_1 --sport 53 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -i $IFACE -p udp -s $NAMESERVER_2 --sport 53 -m state --state ESTABLISHED -j ACCEPT
# Allow UDP packets to DNS servers from client.
iptables -A OUTPUT -o $IFACE -p udp -d $NAMESERVER_1 --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o $IFACE -p udp -d $NAMESERVER_2 --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT

Where $IFACE is the network device with the public IP address on it, and $NAMESERVER_# are your ISP's namserver IP addresses.
 
Old 02-04-2003, 10:26 PM   #3
importboy03
Member
 
Registered: Feb 2003
Location: NorthEast
Distribution: RH 8.0
Posts: 34

Original Poster
Rep: Reputation: 15
I just reinstall my system and make sure the firewall accept DNS port. All of the named is working now. Thanks for ur reply though.
 
Old 02-07-2003, 03:17 AM   #4
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
You certainly haven't gone short way.
a simple command like
iptables -L
iptables -L -t nat
can show you what's going on with your firewall
besides there is a gui program to manage your firewall
 
  


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
cannot SFTP to SUSE 9.2 box, port 22 open, can putty in though using same port. jgrady Linux - Networking 6 03-29-2005 08:44 AM
how to open up firewall for DNS? jdupre Fedora 1 03-15-2005 08:18 AM
port# authority using dns or other? charon's coin Linux - Networking 3 09-14-2003 09:01 AM
Port Forwarding via DNS enigmaweb Linux - Networking 5 08-22-2003 12:36 PM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:49 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