Skip to content

Commit 25c5769

Browse files
author
Rakesh Venkatesh
committed
Allow traffic from private gateway to internet
When private gateway is configured, the external server which are connected through private gateway cannot send traffic to outside world. Add a source iptable rule so that the servers which are connected through private gateway can ping the public IP's
1 parent aec034b commit 25c5769

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

systemvm/debian/opt/cloud/bin/cs/CsAddress.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ def fw_vpcrouter(self):
480480
(self.dev, guestNetworkCidr, self.address['gateway'], self.dev)])
481481

482482
if self.is_private_gateway():
483+
# add rule to allow traffic to outside world
484+
self.fw.append(["filter", "", "-A FORWARD -s %s -j ACCEPT" % (self.address['network'])])
483485
self.fw.append(["filter", "", "-A FORWARD -d %s -o %s -j ACL_INBOUND_%s" %
484486
(self.address['network'], self.dev, self.dev)])
485487
self.fw.append(["filter", "", "-A ACL_INBOUND_%s -j DROP" % self.dev])

0 commit comments

Comments
 (0)