| So, what did I do to let everyone know the website was down? Well, first I
created a little website containing a single page saying "Sorry, but our websites are
down, but we'll be back at <insert time here>". I put this website on the
gateway, which already had http installed. This website was the default website for
this server. The following command removes the above redirect. See man ipnat
for more detail.
echo "rdr ed0 192.168.1.1/32 port 80 -> 10.0.0.1 port 80 tcp" \
| ipnat -r -f -
That was it. The switch was thrown. All incoming requests for my websites
were met by Apache running on my gateway. I could now take down my real webserver in
the knowledge that people would know that my site was down and not be met with some
unpleasant message. It's also better for public relations.
When it was time to bring the webserver back online, I issued this command:
echo "rdr ed0 192.168.1.1/32 port 80 -> 10.0.0.1 port 80 tcp" \
| ipnat -f -
As you can see, the only difference is the "-r" flag.
I also used this flag in using rule groups for
blocking IP blocks. |