I am trying to setup Squid proxy server on my Ubuntu 12.04. There are lot of tutorials on that and I am following them one by one till I get success.
In each tutorial, they have asked to issue commands like below:
modprobe ip_gre
ip tunnel add wccp0 mode gre remote 187.72.34.82 local 192.168.1.2 dev eth0
ifconfig wccp0 192.168.1.2 netmask 255.255.255.255 up
echo 0>/proc/sys/net/ipv4/conf/wccp0/rp_filter
echo 0>/proc/sys/net/ipv4/conf/eth0/rp_filter
echo 1>/proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i wccp0 -p tcp --dport 80 -j REDIRECT --to-port 3129
iptables -t nat -A POSTROUTING -j MASQUERADE
If that particular tutorial does not work, I have to revert these (non working) changes to their default. My questions are:
- Are these commands supposed to be issued via terminal ?
- If I simply reboot the machine, will these changes go away ?
- If not, what can I do to reset them to their default ?
- If I find some set of commands working for me(and if these changes vanish after each reboot), how can I apply them automatically after each reboot ?
Please note that I am a complete beginner having 1 day's experience in Linux.
/etc/rc.local
)