diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-04 22:01:33 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-04 22:01:33 -0400 |
commit | 54fc70b7bf4e3f74c63d068a873de5a9ddf78330 (patch) | |
tree | 98e15626d9271b14f8208e29debbb6685eb0d65a /test/net_defaultgw2.exp | |
parent | grsecurity: --join, --shutdown (diff) | |
download | firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.gz firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.zst firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.zip |
grsecurity: network testing
Diffstat (limited to 'test/net_defaultgw2.exp')
-rwxr-xr-x | test/net_defaultgw2.exp | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/test/net_defaultgw2.exp b/test/net_defaultgw2.exp index be9b4882a..db14e17cb 100755 --- a/test/net_defaultgw2.exp +++ b/test/net_defaultgw2.exp | |||
@@ -5,7 +5,7 @@ spawn $env(SHELL) | |||
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | # check ip address | 7 | # check ip address |
8 | send -- "firejail --net=br0 --net=br1 --defaultgw=10.10.30.89\r" | 8 | send -- "firejail --net=br0 --net=br1 --defaultgw=10.10.30.89 --protocol=unix,inet,netlink\r" |
9 | expect { | 9 | expect { |
10 | timeout {puts "TESTING ERROR 0\n";exit} | 10 | timeout {puts "TESTING ERROR 0\n";exit} |
11 | "eth1" | 11 | "eth1" |
@@ -14,52 +14,27 @@ expect { | |||
14 | timeout {puts "TESTING ERROR 4\n";exit} | 14 | timeout {puts "TESTING ERROR 4\n";exit} |
15 | "Child process initialized" | 15 | "Child process initialized" |
16 | } | 16 | } |
17 | sleep 1 | ||
17 | 18 | ||
18 | # check default gateway | 19 | # check default gateway |
19 | send -- "bash\r" | 20 | send -- "ip route show\r" |
20 | sleep 1 | ||
21 | send -- "netstat -rn;pwd\r" | ||
22 | expect { | 21 | expect { |
23 | timeout {puts "TESTING ERROR 10.1\n";exit} | 22 | timeout {puts "TESTING ERROR 10.1\n";exit} |
24 | "0.0.0.0" | 23 | "default via 10.10.30.89 dev eth1" |
25 | } | 24 | } |
25 | |||
26 | send -- "ip route show\r" | ||
26 | expect { | 27 | expect { |
27 | timeout {puts "TESTING ERROR 10.2\n";exit} | 28 | timeout {puts "TESTING ERROR 10.2\n";exit} |
28 | "10.10.30.89" | 29 | "10.10.20.0/29 dev eth0 proto kernel scope link" |
29 | } | 30 | } |
31 | |||
32 | send -- "ip route show\r" | ||
30 | expect { | 33 | expect { |
31 | timeout {puts "TESTING ERROR 10.3\n";exit} | 34 | timeout {puts "TESTING ERROR 10.3\n";exit} |
32 | "eth1" | 35 | "10.10.30.0/24 dev eth1 proto kernel scope link" |
33 | } | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 10.4\n";exit} | ||
36 | "10.10.20.0" | ||
37 | } | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 10.5\n";exit} | ||
40 | "0.0.0.0" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 10.6\n";exit} | ||
44 | "eth0" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 10.4\n";exit} | ||
48 | "10.10.30.0" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 10.5\n";exit} | ||
52 | "0.0.0.0" | ||
53 | } | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 10.6\n";exit} | ||
56 | "eth1" | ||
57 | } | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 10\n";exit} | ||
60 | "home" | ||
61 | } | 36 | } |
62 | sleep 1 | 37 | sleep 1 |
63 | 38 | ||
64 | puts "\n" | 39 | puts "\nall done\n" |
65 | 40 | ||