Skip to content

another success – firewall

by on January 13, 2013

managed to run FW between the servers.

script:

#!/bin/bash
echo ssh 11.1.1.87 hostname
ssh 11.1.1.87 hostname
echo ENABLE
rm -f json
wget http://10.232.83.85:8080/wm/firewall/module/enable/json >> /dev/null 2>/dev/null
cat json
sleep 5
echo ssh 11.1.1.87 hostname
ssh 11.1.1.87 hostname
echo DISABLE
rm -f json
wget http://10.232.83.85:8080/wm/firewall/module/disable/json >> /dev/null 2>/dev/null
cat json
sleep 5
echo ssh 11.1.1.87 hostname
ssh 11.1.1.87 hostname

output of bash run_FW.sh

ssh 11.1.1.87 hostname
htrhp87
ENABLE
{"status" : "success", "details" : "firewall running"}sleep 10
ssh 11.1.1.87 hostname
ssh: connect to host 11.1.1.87 port 22: No route to host
DISABLE
{"status" : "success", "details" : "firewall stopped"}sleep 10
ssh 11.1.1.87 hostname
htrhp87
Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: