Sponsored Content
Full Discussion: iptables & port 53 (DNS)
Operating Systems Linux Red Hat iptables & port 53 (DNS) Post 302625173 by Duffs22 on Tuesday 17th of April 2012 11:02:44 AM
Old 04-17-2012
No "-S" option on RHEL5. I've listed the tables instead:

Code:
# iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     udp  --  41.181.59.120/29     209.212.96.1        state NEW udp dpt:53 
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0           
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255 
ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353 
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631 
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631 
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:53

R,
D.
 

10 More Discussions You Might Find Interesting

1. IP Networking

Resolving port 8080 in DNS

Hi I have my DNS servers (BIND 8) running on two Solaris 8 boxes. I need to be able to resolve an address blah.xxx.net to an IP address followed by :8080 - (for Tomcat). I tried doing this in my zone file but it failed. Can someone give me a pointer on where this configuration should be done?... (1 Reply)
Discussion started by: korfnz
1 Replies

2. UNIX for Advanced & Expert Users

LINUX 9 IPTABLES and DNS

I have installed a linux 9 router/firewall and have issues with outside DNS queries making it in. here are my IPTABLE rules, can anyone make some suggestions? ETH1 is my outside facing Interface, ETH0 is my inside facing interface. Accept If input interface is not eth1 Accept If protocol is... (1 Reply)
Discussion started by: frankkahle
1 Replies

3. Linux

LINUX 9 IPTABLES and DNS

I have installed a linux 9 router/firewall and have issues with outside DNS queries making it in. here are my IPTABLE rules, can anyone make some suggestions? ETH1 is my outside facing Interface, ETH0 is my inside facing interface. Accept If input interface is not eth1 Accept If protocol... (6 Replies)
Discussion started by: frankkahle
6 Replies

4. UNIX for Dummies Questions & Answers

FTP, DNS & BIND

Hi GURUs, I have two queries. 1)I know I can use FTP clients for my File transfer needs, but I want to learn FTP thru command line, any one can point me to some good online resource available to learn FTP command line with examples, of course free except UNIX man pages. 2) Our company has... (4 Replies)
Discussion started by: patras
4 Replies

5. Solaris

OS Problems -no DNS & SSH not working

I just installed Solaris 6/10 without any problems but I didn't connect the network cable when I installed it. Here are my problems: -I can access webpages using IP addrsses but not with domain names -ssh is installed but it is not running ('ps -e | grep sshd' didn't show it) I have been... (4 Replies)
Discussion started by: kungpow
4 Replies

6. UNIX for Dummies Questions & Answers

DNS & DHCP configuration

Hi to all. Sorry for my bad english. For pure self-educational, not professional, purposes, I am studying how to configure a server with several services operating on it. For my experiment I'm using VirtualBox 3.1.4 on a WinXP host with 3 FreeBSD guests; one acts as a DHCP + DNS server; the... (0 Replies)
Discussion started by: marboxer
0 Replies

7. Solaris

Bind9 DNS on Solaris 10 x4270 & CPU usage

I have configured a Bind9 DNS on a X4270 machine with Solaris10 I am excuting some repformance tests with DNSPERF tool and maximun CPU usage is 23%. I have seen with prstat -L -p PID that named process usses only 2 of the 8 available CPU at the same time although threads for all CPUs exist.... (2 Replies)
Discussion started by: parisph
2 Replies

8. Red Hat

DHCP & DNS - Clients get IP but don't register in DNS

I am trying to setup a CentOS 6.2 server that will be doing 3 things DHCP, DNS & Samba for a very small office (2 users). The idea being this will replace a very old Win2k server. The users are all windows based clients so only the server will be Linux based. I've installed CentOS 6.2 with... (4 Replies)
Discussion started by: FireBIade
4 Replies

9. IP Networking

OS X & VPN DNS Issue

I'll try and be brief and detailed. I have a Macbook Pro Retina running Mavericks. When on my network at the office (work) everything local works just fine. Local servers are resolved through our internal DNS settings. For example, we have a fileserver at "fs01". I can connect to it with... (1 Reply)
Discussion started by: jbhardman
1 Replies

10. Linux

Domain registrars & DNS servers

I have read many tutorials on bind and i understand the A,MX, CNAME records. Internally, on a LAN we can install bind and create all these records and we can tell all PC and servers to use this bind as DNS server.that's fine. On the Internet, when we have purchased a valid domain like... (5 Replies)
Discussion started by: coolatt
5 Replies
LOCKOUT(1)							      lockout								LOCKOUT(1)

NAME
lockout - avoid slacking and impose productivity and discipline on yourself WARNING
This program is VERY DANGEROUS. If it fails, you may end up not knowing the root password to your own computer (in which case you need to boot into single-user mode). There are no known reports of this actually happening, but we don't know how stupid you are. Also, you should probably not run this on a multi-user system. SYNOPSIS
lockout lock HhMm | Hh | Mm lockout lock HH:MM lockout lock HH:MMam | HH:MMpm lockout lock HHam | HHpm lockout lock lockout unlock [force] lockout status DESCRIPTION
Lockout is a tool that imposes discipline on you so that you get some work done. For example, lockout can be used to install a firewall that does not let you browse the Web. Lockout changes the root password for a specified duration; this prevents you from secretly ripping down the firewall and then browsing the Web anyway. In case of an emergency, you can reboot your computer to undo the effects of lockout and to restore the original root password. Obviously, lockout lock and lockout unlock can only be run by root. lockout status can be run by any user. lockout without any parameters shows a brief help message. lockout lock takes one optional parameter. If no parameter is given, you are dropped in interactive mode and asked for the duration of the lock or the time at which the lock should be lifted. You can also supply this as a parameter on the command line. Lockout understands various time formats. You can specify a delay, e.g., 3h (3 hours), 1h30m (1 hour and 30 minutes), or 90m (1 hour and 30 minutes), or you can specify absolute time, e.g., 2pm, 2:30am, 15:30, etc. You will be asked to confirm the time at which lockout will unlock your system. If you type "yes", lockout executes /etc/lockout/lock.sh and changes the root password to something completely random. /etc/lock- out/lock.sh is a shell script that you write. It takes measures to make sure you stop slacking. For example, it could install a firewall that prevents outgoing connections to port 80. See the "EXAMPLES" section below. lockout unlock takes an optional force parameter. Without any parameters, lockout lock will check whether it is time to unlock the system and, if so, executes /etc/lockout/unlock.sh, which is a shell script that you write. It should undo the effects of /etc/lockout/lock.sh, executed when the system was locked. If you pass the force parameter to lockout unlock, lockout will forcibly unlock your system, whether it was really time for that or not. lockout unlock should be called every minute by cron. See "CONFIGURATION". lockout status will print out the time at which the system is going to be unlocked. CONFIGURATION
/etc/cron.d/lockout must contain the following two entries: */1 * * * * root /usr/bin/lockout unlock >/dev/null 2>&1 @reboot root /usr/bin/lockout unlock force >/dev/null 2>&1 The examples that follow assume you are using sudo(8) and you have a file, /etc/lockout/sudoers.normal which is the normal /etc/sudoers file, and /etc/lockout/sudoers.lock, which is the /etc/sudoers file when lockout locks your computer. This example also assumes you are using iptables(8). /var/lib/iptables/active should contain your default firewall rules, and /var/lib/iptables/work should contain the firewall rules that enforce discipline. See below for an example. /etc/lock/lock.sh imposes discipline. For example: #!/bin/sh /etc/init.d/iptables load work cp /etc/lockout/sudoers.lock /etc/sudoers /etc/init.d/sudo stop /etc/init.d/sudo start /etc/lock/unlock.sh undoes these effects. For example: #!/bin/sh /etc/init.d/iptables restart cp /etc/lockout/sudoers.normal /etc/sudoers /etc/init.d/sudo stop /etc/init.d/sudo start Your /var/lib/iptables/work may look something like this: *filter :INPUT ACCEPT [1047:99548] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1104:120792] # allow incoming packets from localhost, ntp, # and existing connections -A INPUT -i lo -j ACCEPT -A INPUT -p udp -m udp --source-port ntp -m state --state ESTABLISHED -j ACCEPT -A INPUT -m state --state ESTABLISHED -j ACCEPT -A INPUT -p tcp -j DROP -A INPUT -p udp -j DROP # allow outgoing connections for email and DNS -A OUTPUT -d 127.0.0.1/8 -j ACCEPT -A OUTPUT -p tcp -m tcp --dport smtp -j ACCEPT -A OUTPUT -p tcp -m tcp --dport domain -j ACCEPT -A OUTPUT -p udp -m udp --dport domain -j ACCEPT -A OUTPUT -j DROP COMMIT EXAMPLES
lockout lock 2h30m [locks out for 2h and 30m] lockout lock 90m [locks out for 1h and 30m] lockout lock 3pm [locks out until 3pm] lockout lock 3:20am [locks out until 3:20am] lockout lock 15:20 [locks out until 3:20pm] lockout status [shows when the system is going to be unlocked] FILES
/etc/lockout/lock.sh: executed when running lockout lock /etc/lockout/unlock.sh: executed when running lockout unlock SEE ALSO
usermod(8), iptables(8), passwd(1), cron(8), crontab(1) BUGS
Arguably, a program that changes the root password to something random with the possibility of never recovering the original password might be considered a bug by itself. Other than that, no known bugs. AUTHOR
Thomer M. Gil, http://thomer.com/lockout/ lockout 2004-09-08 LOCKOUT(1)
All times are GMT -4. The time now is 10:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy