Bladeren bron

vlanm script improved

master
Dirk Alders 1 jaar geleden
bovenliggende
commit
dd58a6905e
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2
    2
      vlanm

+ 2
- 2
vlanm Bestand weergeven

@@ -62,7 +62,7 @@ if __name__ == "__main__":
62 62
             print("Remove rule:", UID_O)
63 63
         if getpass('Proceed? [Y/n]') in ['', 'y', 'Y']:
64 64
             if rn is None:
65
-                my_cmd = ['sudo',  '-S', 'iptables', '-A', 'FORWARD', '-j', 'ACCEPT', '-i', device_by_vlan(args.vlan_number), '-o', 'eth0', '!', '-d', '192.168.0.0/16', '-m', 'comment', '--comment', UID_O]
65
+                my_cmd = ['sudo',  '-S', 'iptables', '-A', 'FORWARD', '-j', 'ACCEPT', '-i', device_by_vlan(args.vlan_number), '-o', device_by_vlan(10), '!', '-d', '192.168.0.0/16', '-m', 'comment', '--comment', UID_O]
66 66
                 cmd = subprocess.run(my_cmd, stdout=subprocess.PIPE, input=password, encoding="ascii",)
67 67
                 print(cmd.stdout)
68 68
             else:
@@ -79,7 +79,7 @@ if __name__ == "__main__":
79 79
             print("Remove rule:", UID_L)
80 80
         if getpass('Proceed? [Y/n]') in ['', 'y', 'Y']:
81 81
             if rn is None:
82
-                my_cmd = ['sudo', '-S', 'iptables', '-A', 'FORWARD', '-j', 'LOG', '-i', device_by_vlan(args.vlan_number), '-o', 'eth0', '!', '-d', '192.168.0.0/16', '-m', 'comment', '--comment', UID_L]
82
+                my_cmd = ['sudo', '-S', 'iptables', '-A', 'FORWARD', '-j', 'LOG', '-i', device_by_vlan(args.vlan_number), '-o', device_by_vlan(10), '!', '-d', '192.168.0.0/16', '-m', 'comment', '--comment', UID_L]
83 83
                 cmd = subprocess.run(my_cmd, stdout=subprocess.PIPE, input=password, encoding="ascii",)
84 84
                 print(cmd.stdout)
85 85
                 print("Use 'sudo ~/bin/ftail /var/log/kern.log' to view the logs.")

Laden…
Annuleren
Opslaan