Skip to content

test action configure rules destination_ports

Testy dopasowania destination_ports

Schemat testów

  • ustawienie iptables z logownaiem protokołu tcp z określonym destination_ports
  • netcat
  • sprawdzenie logów

test case'y

test z 2 logowanymi pakietami

  • reguła iptables z logowanie pakietów tcp na portach 50050-50051
iptables_firewall_rules:
  - table: "filter"
    chain: "INPUT"
    default_policy: "ACCEPT"
    rules:
      - protocol: "tcp"
        destination_ports: 
          begin: 50050
          end: 50051
        action:
          name: "LOG"
          log_prefix: "test-logs"
  • nc -vz localhost 50050
  • nc -vz localhost 50051
  • sprawdzenie czy 2 logi się pojawiły

test z 1 logowanym pakietem

  • reguła iptables z logowanie pakietów tcp na portach 50051-50052
iptables_firewall_rules:
  - table: "filter"
    chain: "INPUT"
    default_policy: "ACCEPT"
    rules:
      - protocol: "tcp"
        destination_ports: 
          begin: 50051
          end: 50052
        action:
          name: "LOG"
          log_prefix: "test-logs"
  • nc -vz localhost 50050
  • nc -vz localhost 50051
  • sprawdzenie czy 1 log się pojawił

test bez logów

  • reguła iptables z logowanie pakietów tcp na portach 50052-50053
iptables_firewall_rules:
  - table: "filter"
    chain: "INPUT"
    default_policy: "ACCEPT"
    rules:
      - protocol: "tcp"
        destination_ports: 
          begin: 50052
          end: 50053
        action:
          name: "LOG"
          log_prefix: "test-logs"
  • nc -vz localhost 50050
  • nc -vz localhost 50051
  • sprawdzenie czy log się nie pojawił
Edited by Michal Konstantynowicz
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information