Skip to content

Commit

Permalink
Merge pull request rapidftr#609 from rdsubhas/master
Browse files Browse the repository at this point in the history
[Subhas] Fix Netbook-to-netbook and Netbook-to-server sync
  • Loading branch information
rdsubhas committed Nov 18, 2013
2 parents e7d36ab + 0bf7ec2 commit cc14b69
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/tasks/ubuntu/rapidftr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ post-start script

RAPIDFTR_LXC_HOST="10.0.3.3"
(
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:80
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:443
iptables -t nat -A PREROUTING -p tcp --dport 5984 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:5984
iptables -t nat -A PREROUTING -p tcp --dport 6984 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:6984
iptables -t nat -A PREROUTING -p tcp --dport 80 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:80
iptables -t nat -A PREROUTING -p tcp --dport 443 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:443
iptables -t nat -A PREROUTING -p tcp --dport 5984 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:5984
iptables -t nat -A PREROUTING -p tcp --dport 6984 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:6984
iptables -A FORWARD -p tcp -o lxcbr0 -j ACCEPT
) || echo "Unable to configure port forwarding rules"

Expand All @@ -22,10 +22,10 @@ end script
post-stop script
RAPIDFTR_LXC_HOST="10.0.3.3"
(
iptables -t nat -D PREROUTING -p tcp --dport 80 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:80
iptables -t nat -D PREROUTING -p tcp --dport 443 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:443
iptables -t nat -D PREROUTING -p tcp --dport 5984 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:5984
iptables -t nat -D PREROUTING -p tcp --dport 6984 -j DNAT --to-destination $RAPIDFTR_LXC_HOST:6984
iptables -t nat -D PREROUTING -p tcp --dport 80 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:80
iptables -t nat -D PREROUTING -p tcp --dport 443 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:443
iptables -t nat -D PREROUTING -p tcp --dport 5984 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:5984
iptables -t nat -D PREROUTING -p tcp --dport 6984 ! -s $RAPIDFTR_LXC_HOST -j DNAT --to-destination $RAPIDFTR_LXC_HOST:6984
iptables -D FORWARD -p tcp -o lxcbr0 -j ACCEPT
) || echo "Unable to remove port forwarding rules"

Expand Down

0 comments on commit cc14b69

Please sign in to comment.