I need to create a gre tunnel during startup to make my cisco and squid work together transparently.
If I add the folowing commands from console everything works fine, WCCP works:
iptunnel add gre0 mode gre remote 192.168.70.254 local 192.168.70.10 dev eth0
ifconfig gre0 inet 192.168.70.9 netmask 255.255.255.0 up
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/gre0/rp_filter
iptables -F -t nat
# iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i gre0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.70.10:3128

Further, if i make a startup scripts this way I cannot even ping my SUSE.
I do it such way:
1.cd /etc/init.d/
2.touch wccp
3.vim wccp
4.save the file
5.chmod +x wccp
6.chkconfig -a wccp

wccp file has this text inside

iptunnel add gre0 mode gre remote 192.168.70.254 local 192.168.70.10 dev eth0
ifconfig gre0 inet 192.168.70.9 netmask 255.255.255.0 up
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/gre0/rp_filter
iptables -F -t nat
# iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i gre0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.70.10:3128


Plese help thenk you.