Re: newbie question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* M. Ahmad Ijaz <ahmad@xxxxxxxxxxxxxxxxxxxxx>  8. Apr 04:
> hi,

Hello,

> modprobe ip_tables
> modprobe ip_conntrack
> modprobe iptable_nat
> modprobe ip_conntrack_ftp
> modprobe ip_nat_ftp
> 
> iptables -P INPUT ACCEPT
> iptables -P OUTPUT ACCEPT
> iptables -P FORWARD DROP
> iptables -A INPUT -p icmp --icmp-type 8 -j DROP 
> 
> iptables -A PREROUTING -s xxx.xxx.xxx.xxx/yyy.yyy.yyy.yyy -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
> 
> where xxx is any IP and yyy is the subnet mask, it returns me the same
> message i.e.  iptables: No chain/target/match by that name

Try

# iptables -t nat -A PREROUTING ...

Rules go into the filter table by default, if not specified otherwise,
but filter has not {PRE,POST}ROUTING.

> also i dont wana load the modules and the commands each time the
> system starts, so when i type the commands i used iptables-save
> command to save tat, also is there ne possibility where i can store
> the command and execute when system startsup

As a script somewhere in /etc/init.d/ and a symlink in
/etc/rc.$defaultrunlevel/.

HTH,
 regards, Frank.
-- 
Sigmentation fault


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux