Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables DNS port

Reply
Thread Tools Display Modes

iptables DNS port

 
 
Baho Utot
Guest
Posts: n/a

 
      02-09-2005, 08:58 PM
I have the following rules for DNS (bind 9 running as caching server)
are the following correct?

Comments please.

#
# DNS Name Server TCP 53/UDP 25
#
$IPTABLES -A OUTPUT -o $INTERNET -p udp \
--sport $UNPRIVPORTS \
-d $NAMESERVER --dport 53 \
-m state --state NEW -j ACCEPT
$IPTABLES -A OUTPUT -o $INTERNET -p tcp \
--sport $UNPRIVPORTS \
-d $NAMESERVER --dport 53 \
-m state --state NEW -j ACCEPT
if [ $DNS_CACHE = "1" ]; then
# DNS CACHE LAN clients to private server (53)
$IPTABLES -A INPUT -i $LAN -p udp \
--sport $UNPRIVPORTS \
-d $LAN_ADDR --dport 53 \
-m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -i $LAN -p tcp \
--sport $UNPRIVPORTS \
-d $LAN_ADDR --dport 53 \
-m state --state NEW -j ACCEPT
else
$IPTABLES -A FORWARD -o $INTERNET -p udp \
--sport $UNPRIVPORTS \
-d $NAMESERVER --dport 53 \
-m state --state NEW -j ACCEPT
$IPTABLES -A FORWARD -o $INTERNET -p tcp \
--sport $UNPRIVPORTS \
-d $NAMESERVER --dport 53 \
-m state --state NEW -j ACCEPT
fi

Also will the following rule log all port 53 packets (from internet
interface)?

$IPTABLES -A INPUT -i $INTERNET -p tcp -d $INTERNET_IPADDR --dport 53 -j LOG
 
Reply With Quote
 
 
 
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables / recent regarding port 113 E. Pluribus Linux Networking 1 06-02-2008 08:10 PM
iptables DNS port Baho Utot Linux Networking 2 02-14-2005 04:07 PM
Port forwarding with iptables ??? Joe Attardi Linux Networking 4 05-10-2004 11:45 PM
iptables port forwarding anonymous Linux Networking 1 01-22-2004 09:25 AM
iptables port forwarding Jason Lee Linux Networking 4 10-13-2003 12:53 AM



1 2 3 4 5 6 7 8 9 10 11