Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables / recent regarding port 113

Reply
Thread Tools Display Modes

iptables / recent regarding port 113

 
 
E. Pluribus
Guest
Posts: n/a

 
      06-02-2008, 04:59 PM


I want to allow incoming ident requests, but only if there was data sent
to the source IP of the requests within the past 30 seconds.

This is what I've tried:

iptables -A INPUT -i eth2 -p tcp -m tcp --dport 113 -m recent /
--rcheck --name IDENT --seconds 30 -j ACCEPT

iptables -A OUTPUT -o eth2 -p tcp -m multiport --dports 6667,7000 /
-m recent --set --name IDENT --rdest

Ident requests continue to be dropped, however.

eth2 has a public ip address. Defaut policy is to drop all input and
prior to the above statments in the script I have:

iptables -A INPUT -i eth2 -m state --state ESTABLISHED -j ACCEPT

Right now I just keep port 113 permenantly open using (when not using the
above rules) with:

iptables -A INPUT -i eth2 -p tcp --dport 113 -j ACCEPT

 
Reply With Quote
 
 
 
 
Mitch Crane
Guest
Posts: n/a

 
      06-02-2008, 08:10 PM
"E. Pluribus" <(E-Mail Removed)> wrote in
news:Xns9AB1842303D75getonthtpluribusorg@216.196.9 7.136:

> I want to allow incoming ident requests, but only if there was data

sent
> to the source IP of the requests within the past 30 seconds.
>
> This is what I've tried:
>
> iptables -A INPUT -i eth2 -p tcp -m tcp --dport 113 -m recent /
> --rcheck --name IDENT --seconds 30 -j ACCEPT
>
> iptables -A OUTPUT -o eth2 -p tcp -m multiport --dports 6667,7000 /
> --name IDENT --rdest
>
> Ident requests continue to be dropped, however.
>
> eth2 has a public ip address. Defaut policy is to drop all input and
> prior to the above statments in the script I have:
>
> iptables -A INPUT -i eth2 -m state --state ESTABLISHED -j ACCEPT
>
> Right now I just keep port 113 permenantly open using (when not using

the
> above rules) with:
>
> iptables -A INPUT -i eth2 -p tcp --dport 113 -j ACCEPT


Ok, I think I have it fixed. The problem was I had a rule accepting all
outgoing traffic on eth2 (-j ACCEPT) before my recent match rule for
ports 6667 and 7000 , so it never got there.




--
ybbxvatyvxrnobeantnvayvivatyvxrnurergvpyvfgravatgb neguheyrrerpbeqfznxv
atnyylbhesevraqfsrryfbthvyglnobhggurveplavpvfznaqg urerfgbsgurvetrareng
vbaabgriragurtbireazragnertbaanfgbclbhabjohgnerlbh ernqlgborurnegoebxra
 
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 + port traffic Rufman Linux Networking 1 09-22-2007 04:51 PM
need help on port forward using iptables. jsuthan Linux Networking 7 01-21-2006 01:53 AM
iptables DNS port Baho Utot Linux Networking 2 02-14-2005 04:07 PM
iptables DNS port Baho Utot Linux Networking 0 02-09-2005 08:58 PM
Port Forwarding with iptables Allan Bruce Linux Networking 0 08-27-2003 11:44 AM



1 2 3 4 5 6 7 8 9 10 11