Re: routing help on dual homed box
On Mon, Jan 07, 2002 at 02:49:16PM -0600, Ron Johnson did this all over the keyboard:
> > why do you care about your ip address?
> >
> > iface=<your device>
> >
> > ifconfig ${iface} | grep 'inet' | cut -d: -f2 | cut -d " " -f1
>
> So, to block port 1524, I can say
> ipchains -A input -p tcp -s 0/0 1524 -j DENY -l -i $iface
> instead of
> ipchains -A input -p tcp -s 0/0 -d $out_ip/255.255.255.0 \
no, sorry, it was my mistake.
ip=$(ifconfig ${iface} | grep 'inet' | cut -d: -f2 | cut -d " " -f1)
this command should also be put into a variable. then you would use
something like this:
'ipchains -A input -p tcp -s 0/0 1524 -j DENY -l -i $ip'
but your example also works, anyways. i prefer it this way :).
have fun,
Willi
--
Willi Dyck: System Engineer
wdyck@gmx.net http://www.willos.de.vu/
flateric Geek by nature
System: Debian GNU/Linux 2.2r3 woody
Reply to: