Class: Dcmgr::VNet::Tasks::AcceptIpFromGateway
- Inherits:
-
Dcmgr::VNet::Task
- Object
- Dcmgr::VNet::Task
- Dcmgr::VNet::Tasks::AcceptIpFromGateway
- Includes:
- Netfilter
- Defined in:
- lib/dcmgr/vnet/tasks/accept_ip_from_gateway.rb
Overview
Explicitely allows IP traffic between the gateway and the instances
Instance Attribute Summary collapse
-
#gateway_ip ⇒ Object
readonly
Returns the value of attribute gateway_ip.
Attributes inherited from Dcmgr::VNet::Task
Instance Method Summary collapse
-
#initialize(gateway_ip) ⇒ AcceptIpFromGateway
constructor
A new instance of AcceptIpFromGateway.
Constructor Details
#initialize(gateway_ip) ⇒ AcceptIpFromGateway
Returns a new instance of AcceptIpFromGateway.
12 13 14 15 16 17 18 |
# File 'lib/dcmgr/vnet/tasks/accept_ip_from_gateway.rb', line 12 def initialize(gateway_ip) super() @gateway_ip = gateway_ip self.rules << IptablesRule.new(:filter,:forward,nil,:incoming,"-s #{gateway_ip} -j ACCEPT") end |
Instance Attribute Details
#gateway_ip ⇒ Object (readonly)
Returns the value of attribute gateway_ip.
10 11 12 |
# File 'lib/dcmgr/vnet/tasks/accept_ip_from_gateway.rb', line 10 def gateway_ip @gateway_ip end |