Linux Netfilter discussions
 help / color / mirror / Atom feed
* If i follow these stpes for my iptables?
@ 2002-09-13  3:32 Silkk
  2002-09-13  5:36 ` R. Sterenborg
  0 siblings, 1 reply; 2+ messages in thread
From: Silkk @ 2002-09-13  3:32 UTC (permalink / raw)
  To: netfilter

Hello,

I was wandering if someone could go  over this and
tell me if im did soomething wrong in these steps i
have tryed this many times but keep 

getting error wandering where im going wrong

Ok installed linux 7.2 it comes with iptables already
installed iptablesv1.2.3  Now i want to install
iptables 1.2.7 Soo here is what im 

doing...

Re-Compile my kernel to 2.4.19 with 
CONFIG_PACKET 
CONFIG_NETFILTER 
CONFIG_CONNTRACK 
CONFIG_IP_NF_FTP 
CONFIG_IP_NF_IRC 
CONFIG_IP_NF_IPTABLES 
CONFIG_IP_NF_FILTER 
CONFIG_IP_NF_NAT 
CONFIG_IP_NF_MATCH_STATE 
CONFIG_IP_NF_TARGET_LOG 
CONFIG_IP_NF_MATCH_LIMIT 
CONFIG_IP_NF_TARGET_MASQUERADE 
ALL built in the kernel: 
***************************************************************************************************************************************
Next i am going to download IPTABLES-1.2.7 and install
them
bzip2 -cd iptables-1.2.3.tar.bz2 | tar -xvf 
make KERNEL_DIR=/usr/src/linux/ 
make install KERNEL_DIR=/usr/src/linux/ 
****************************************************************************************************************************************
Next im going to create a script for my iptables named
"rc.firewall" in the "/etc/rc.d/" dir. where i create
my rules:
then im going to 
chown root.root /etc/rc.d/rc.firewall
chmod u=rwx /etc/rc.d/rc.firewall
sh /etc/rc.d/rc.firewall
And im going to add the following line "sh
/etc/rc.d/rc.firewall" to the end of the
"/etc/ec.d/rc.local" file: all this is soo it will 

startup everytime compouters starts..
***************************************************************************************************************************************
Since i have a dynamic ip address im going to install
"PUMP" from Linux instal disc 2
rpm -iv pump-1.1.11

Then im going to create a "PUMP.CONF" file in the
"/etc" directpory which will look like this
-------------------------------------------------------------------
retries 3
script /etc/rc.d/rc.pump.done

device eth0 {
     noisdomain
}
------------------------------------------------------------
And then the following shell commands can be placed in
the firewall script some point after any HARDCODED
definitions of IPADDRESS
-------------------------------------------------------------
if [ -f /etc/rc.d/pump.info ]; then
     . /etc/rc.d/pump.info
 else

 echo "rc.firewall: dhcp is not configured."
 sh /ect/init.d/iptables panic
 exit 1 
fi
------------------------------------------------
Sooo then in the "/etc/rc.d" i will create this script
--------------------------------------------------------------------------
#!/bin/bash

if [ "$1" = "down" ]; then
    exit 0
fi

if [ "$1" = "lease" ]; then
    echo address $3 assigned to network interface $2 >
/dev/console
fi

/sbin/pump -i eth0 -s > /var/tmp/pump.out

IPADDR=`fgrep IP: /var/tmp/pump.out | sed -e "s/.*IP:
//"`
NETMASK=`fgrep IP: /var/tmp/pump.out | sed -e
"s/.*Netmask: //"`
BROADCAST=`fgrep IP: /var/tmp/pump.out | sed -e
"s/.*Broadcast: //"`
NETWORK=`fgrep IP: /var/tmp/pump.out | sed -e
"s/.*Network: //"`
DHCP_SERVER=`fgrep IP: /var/tmp/pump.out | sed -e
"s/.*DHCP_SERVER: //"`
GATEWAY=`fgrep IP: /var/tmp/pump.out | sed -e
"s/.*Gateway: //"`
DOMAIN=`fgrep IP: /var/tmp/pump.out | sed -e
"s/.*Domain: //"`

rm /var/tmp/pump.out

echo IPADDR=$IPADDR . /etc/rc.d/pump.info
echo NETMASK=$NETMASK >> /etc/rc.d/pump.info
echo SUBNET_BASE=$NETWORK >> /etc/rc.d/pump.info
echo SUBNET_BROADCAST=$BROADCAST >>
/etc/rc.d/pump.info
echo GATEWAY=$GATEWAY >> /etc/rc.d/pump.info
echo HOSTNAME=$HOSTNAME >> /etc/rc.d/pump.info
echo DHCP_SERVER=$DHCP_SERVER>> /etc/rc.d/pump.info

sh /etc/init.d/iptables restart

exit 0
-----------------------------------------------------------------------------------------

What im asking is if i follow these steps  should i
have any problems cause this is my 3 rd try with this
i wannaknow what i am doing wrong.. see i thought it
maybe casue i have already have IPTABLES installed im
instaling 1.2.7 worng???

thanks for the help guys!!!          



__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: If i follow these stpes for my iptables?
  2002-09-13  3:32 If i follow these stpes for my iptables? Silkk
@ 2002-09-13  5:36 ` R. Sterenborg
  0 siblings, 0 replies; 2+ messages in thread
From: R. Sterenborg @ 2002-09-13  5:36 UTC (permalink / raw)
  To: netfilter

> What im asking is if i follow these steps  should i
> have any problems cause this is my 3 rd try with this
> i wannaknow what i am doing wrong.. see i thought it
> maybe casue i have already have IPTABLES installed im
> instaling 1.2.7 worng???

Right.
So what did you install ? There's no such thing as "Linux 7.2". Is it
RedHat 7.2 ?
And is you do : rpm -q iptables, does it tell you it has iptables
installed ? (Or try : whereis iptables, to check if it sees multiple
iptables' in your path.)
If so, you may want to uninstall it. Also check if ipchains is
installed ; you don't need nor want it.
Besides that, you're mailing this list because you seem to have a
problem with something but you didn't tell us what that problem is.
You only told us what you did.
Could you give more details about any errors, things that happen or
don't happen ?


Rob



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-13  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-13  3:32 If i follow these stpes for my iptables? Silkk
2002-09-13  5:36 ` R. Sterenborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox