Class: BetterCap::Firewalls::Redirection
- Inherits:
-
Object
- Object
- BetterCap::Firewalls::Redirection
- Defined in:
- lib/bettercap/firewalls/redirection.rb
Overview
This class represents a firewall port redirection rule.
Instance Attribute Summary collapse
-
#dst_address ⇒ Object
readonly
Destination address.
-
#dst_port ⇒ Object
readonly
Destionation port.
-
#interface ⇒ Object
readonly
Network interface name.
-
#protocol ⇒ Object
readonly
Protocol name.
-
#src_address ⇒ Object
readonly
Source address.
-
#src_port ⇒ Object
readonly
Source port.
Instance Method Summary collapse
-
#initialize(interface, protocol, src_address, src_port, dst_address, dst_port) ⇒ Redirection
constructor
Create the redirection rule for the specified
interface
andprotocol
.
Constructor Details
#initialize(interface, protocol, src_address, src_port, dst_address, dst_port) ⇒ Redirection
Create the redirection rule for the specified interface
and protocol
. Redirect src_address
:src_port
to dst_address
:dst_port
32 33 34 35 36 37 38 39 |
# File 'lib/bettercap/firewalls/redirection.rb', line 32 def initialize( interface, protocol, src_address, src_port, dst_address, dst_port ) @interface = interface @protocol = protocol @src_address = src_address @src_port = src_port @dst_address = dst_address @dst_port = dst_port end |
Instance Attribute Details
#dst_address ⇒ Object (readonly)
Destination address.
26 27 28 |
# File 'lib/bettercap/firewalls/redirection.rb', line 26 def dst_address @dst_address end |
#dst_port ⇒ Object (readonly)
Destionation port.
28 29 30 |
# File 'lib/bettercap/firewalls/redirection.rb', line 28 def dst_port @dst_port end |
#interface ⇒ Object (readonly)
Network interface name.
18 19 20 |
# File 'lib/bettercap/firewalls/redirection.rb', line 18 def interface @interface end |
#protocol ⇒ Object (readonly)
Protocol name.
20 21 22 |
# File 'lib/bettercap/firewalls/redirection.rb', line 20 def protocol @protocol end |
#src_address ⇒ Object (readonly)
Source address.
22 23 24 |
# File 'lib/bettercap/firewalls/redirection.rb', line 22 def src_address @src_address end |
#src_port ⇒ Object (readonly)
Source port.
24 25 26 |
# File 'lib/bettercap/firewalls/redirection.rb', line 24 def src_port @src_port end |