Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-14-2005, 10:55 AM
|
#1
|
Member
Registered: May 2005
Location: uk - Reading
Distribution: slackware 14.2 kernel 4.19.43
Posts: 462
Rep:
|
dynamic iptables rules
scuse my ignorance.
I'm interested in only allowing a connection to my ident service(auth) only if i have recently connected to the site who is making the request.
Is there a way i can achieve this with iptables without just leaving the port open to responses from anywhere or statically assigning the source ip ?
thnks
rj
|
|
|
09-14-2005, 01:59 PM
|
#2
|
Member
Registered: Apr 2004
Location: Charleston, SC
Distribution: RHEL, CentOS, Debian, Gentoo, Knoppix & DSL
Posts: 126
Rep:
|
Use the '-m state ESTABLISHED,RELATED' condition on that port.
If that doesn't suit your needs, check out recent matches at:
http://iptables-tutorial.frozentux.n...cent-match.txt
RK
Last edited by rjkfsm; 09-14-2005 at 02:22 PM.
|
|
|
09-14-2005, 02:43 PM
|
#3
|
Member
Registered: May 2005
Location: uk - Reading
Distribution: slackware 14.2 kernel 4.19.43
Posts: 462
Original Poster
Rep:
|
Many thnks.
|
|
|
09-15-2005, 11:38 AM
|
#4
|
Member
Registered: May 2005
Location: uk - Reading
Distribution: slackware 14.2 kernel 4.19.43
Posts: 462
Original Poster
Rep:
|
m state ESTABLISHED,RELATED dosn't suit my needs.
one thing....re the link.
Code:
iptables -A http-recent-final1 -p tcp -m recent --name httplist \
--tcp-flags SYN,ACK,FIN FIN,ACK --close -j ACCEPT
i can find no information on the "--close" switch in the man pages google etc..
can anyone explain?
thnks
slzckboy
|
|
|
10-18-2005, 02:28 PM
|
#5
|
Member
Registered: May 2005
Location: uk - Reading
Distribution: slackware 14.2 kernel 4.19.43
Posts: 462
Original Poster
Rep:
|
this seems to work in that the irc server now advises that it got an ident response.
Code:
$IPTABLES -A OUTPUT -p tcp -s $NTL_IP -m tcp --dport 6667 -j recent-irc-connection
$IPTABLES -A INPUT -p tcp -m tcp --dport 113 -j recent-irc-connection
# recent-irc-connection chain.
$IPTABLES -N recent-irc-connection
#for output connections
$IPTABLES -A recent-irc-connection -s $NTL_IP -m recent --name irclist --set --rdest -j ACCEPT
#for input connections
$IPTABLES -A recent-irc-connection -s 0/0 -m recent --name irclist --rcheck -j ACCEPT
|
|
|
All times are GMT -5. The time now is 07:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|