LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2014, 12:35 PM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Invoke command through iptables


Hi
Is it possible to invoke a command through iptables, I.e. instead of -j ACCDEPT , -j someScript.sh, this is for a specific test scenario. Any ideas ?
Thanks
 
Old 02-20-2014, 05:30 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603
Could port knocking help? Basically you'd be able to configure a custom command using knockd.
 
Old 02-21-2014, 05:26 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
Hi Unspawn
Actually knockd does look like a viable solution, my only problem is that I do have 15 IPs and I only want to execute the command when two destinations IPs are hit, do you have any idea of whether knockd takes the destination IP as an argument apart from ports ?
Thanks !
 
Old 02-21-2014, 01:29 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603
I don't but it's something you can find out yourself. You'd probably be able to get what you need with the right iptables rules.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Invoke Command through BIND ALInux Linux - Server 2 02-20-2014 12:54 PM
Invoke the VIDEO_TS from the command line using mplayer lothario Linux - Software 5 12-14-2012 12:33 AM
How do i invoke the ls command within a C code Josh_ Programming 8 03-01-2006 02:37 PM
error when using a system command to invoke convert nodyl Programming 4 08-25-2004 11:00 PM
how to invoke a linux command inside a java code ? kusum Linux - Software 2 11-23-2003 02:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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