Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iptables
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Mon Mar 22, 2004 1:54 pm    Post subject: iptables Reply with quote

Hi,

I'm just a little confused about why using iptables scripts when I can edit /var/lib/rules-save and can use interfaces instead of ips. So why?
_________________
mb
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Mar 22, 2004 3:06 pm    Post subject: Reply with quote

I'm a little confused by what you mean to say here - both interfaces and ip addresses are possible filter sources for iptables.

So - what ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Mon Mar 22, 2004 3:43 pm    Post subject: Reply with quote

What I'm talking about that if you look around you see all iptables shell scripts. What I mean to do is to create the rules file manually :P
So it is

$ipt -A INPUT ... from a script VS [0:0] -A INPUT ... from rules-save
_________________
mb
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Mar 23, 2004 6:06 pm    Post subject: Reply with quote

Yes.... and I'm still confused what exactly you mean.

Yes, you can write iptables rules manually.
Yes, you can use a script.
Yes, you can even use a full interface to it like shorewall
Or you can use a firewall distro like ipcop.

So ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Tue Mar 23, 2004 9:20 pm    Post subject: Reply with quote

My question is: what is the difference between generating iptables rules with a script and writing the rules manually? What can a script provide that I can't do manually? Why does scripts exist if I can write all my rules by hand?
_________________
mb
Back to top
View user's profile Send private message
Peracles
Tux's lil' helper
Tux's lil' helper


Joined: 13 Nov 2003
Posts: 143
Location: Dallas, Texas

PostPosted: Tue Mar 23, 2004 9:25 pm    Post subject: Reply with quote

mbjr wrote:
My question is: what is the difference between generating iptables rules with a script and writing the rules manually? What can a script provide that I can't do manually? Why does scripts exist if I can write all my rules by hand?


Tools have been written that generate scripts or files that can be used/loaded by iptables to implement a firewall. You can also write manual rules that can be used by iptables to implement a firewall. Most people write a script to set up their firewall because they have 25+ rules to set up.
Back to top
View user's profile Send private message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Wed Mar 24, 2004 12:20 pm    Post subject: Reply with quote

I think ppl who uses firewalls are having more than 25 rules to create, but I don't think it's harder to write the iptables rules by hand than configuring X right :-) but I'm sure it's much more complicated to write a script for that. I don't see the point.

If you have a dynamic IP, and you use a script which usually uses fix ips in the config geting the actual ip right from the iterface, and then you can play around start your script every time you have to restart your connection

And if you have a fix IP, than it really doesn't metter.

If there were script to made your work really easy with iptables, let's say you'd have arrays like:
nat_allowed="22,25,80,443"
than it'd be ok, but this:
$IPT -A INPUT ...something -j ACCEPT

is not the easy way :-) It's almost that hard to understand that script like making the results by hand

So I just don't see the point :-/
_________________
mb
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Mar 24, 2004 5:22 pm    Post subject: Reply with quote

mbjr wrote:
What can a script provide that I can't do manually? Why does scripts exist if I can write all my rules by hand?

Probably for the same reason that nobody's stopping you from writing an office suite in assembler...
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Wed Mar 24, 2004 11:58 pm    Post subject: Reply with quote

lol :-) great point. :-) Thanks for the info guys.
_________________
mb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum