diff options
author | netblue30 <netblue30@yahoo.com> | 2016-05-03 09:27:26 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-05-03 09:27:26 -0400 |
commit | f36842dfdf11412dadee89d2e32ebbecc2f8a37e (patch) | |
tree | 062227fe715506bc033525157e6fc22e0ff43ae7 /test/network | |
parent | networking features testing (diff) | |
download | firejail-f36842dfdf11412dadee89d2e32ebbecc2f8a37e.tar.gz firejail-f36842dfdf11412dadee89d2e32ebbecc2f8a37e.tar.zst firejail-f36842dfdf11412dadee89d2e32ebbecc2f8a37e.zip |
networking features testing
Diffstat (limited to 'test/network')
-rwxr-xr-x | test/network/configure | 24 | ||||
-rwxr-xr-x | test/network/network.sh | 62 |
2 files changed, 86 insertions, 0 deletions
diff --git a/test/network/configure b/test/network/configure new file mode 100755 index 000000000..788c5a9a0 --- /dev/null +++ b/test/network/configure | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | brctl addbr br0 | ||
4 | ifconfig br0 10.10.20.1/29 up | ||
5 | # NAT masquerade | ||
6 | iptables -t nat -A POSTROUTING -o eth0 -s 10.10.20.0/29 -j MASQUERADE | ||
7 | # port forwarding | ||
8 | # iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.10.20.2:80 | ||
9 | |||
10 | brctl addbr br1 | ||
11 | ifconfig br1 10.10.30.1/24 up | ||
12 | brctl addbr br2 | ||
13 | ifconfig br2 10.10.40.1/24 up | ||
14 | brctl addbr br3 | ||
15 | ifconfig br3 10.10.50.1/24 up | ||
16 | brctl addbr br4 | ||
17 | ifconfig br4 10.10.60.1/24 up | ||
18 | ip link add link eth0 name eth0.5 type vlan id 5 | ||
19 | /sbin/ifconfig eth0.5 10.10.205.10/24 up | ||
20 | ip link add link eth0 name eth0.6 type vlan id 6 | ||
21 | /sbin/ifconfig eth0.6 10.10.206.10/24 up | ||
22 | ip link add link eth0 name eth0.7 type vlan id 7 | ||
23 | /sbin/ifconfig eth0.7 10.10.207.10/24 up | ||
24 | |||
diff --git a/test/network/network.sh b/test/network/network.sh new file mode 100755 index 000000000..7b6d66e34 --- /dev/null +++ b/test/network/network.sh | |||
@@ -0,0 +1,62 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | echo "TESTING: network profile (net_profile.exp)" | ||
10 | ./net_profile.exp | ||
11 | |||
12 | echo "TESTING: bandwidth (bandwidth.exp)" | ||
13 | ./bandwidth.exp | ||
14 | |||
15 | echo "TESTING: IPv6 support (ip6.exp)" | ||
16 | ./ip6.exp | ||
17 | |||
18 | echo "TESTING: local network (net_local.exp)" | ||
19 | ./net_local.exp | ||
20 | |||
21 | echo "TESTING: no network (net_none.exp)" | ||
22 | ./net_none.exp | ||
23 | |||
24 | echo "TESTING: network IP (net_ip.exp)" | ||
25 | ./net_ip.exp | ||
26 | |||
27 | echo "TESTING: network MAC (net_mac.exp)" | ||
28 | sleep 2 | ||
29 | ./net_mac.exp | ||
30 | |||
31 | echo "TESTING: network MTU (net_mtu.exp)" | ||
32 | ./net_mtu.exp | ||
33 | |||
34 | echo "TESTING: network hostname (hostname.exp)" | ||
35 | ./hostname.exp | ||
36 | |||
37 | echo "TESTING: network bad IP (net_badip.exp)" | ||
38 | ./net_badip.exp | ||
39 | |||
40 | echo "TESTING: network no IP test 1 (net_noip.exp)" | ||
41 | ./net_noip.exp | ||
42 | |||
43 | echo "TESTING: network no IP test 2 (net_noip2.exp)" | ||
44 | ./net_noip2.exp | ||
45 | |||
46 | echo "TESTING: network default gateway test 1 (net_defaultgw.exp)" | ||
47 | ./net_defaultgw.exp | ||
48 | |||
49 | echo "TESTING: network default gateway test 2 (net_defaultgw2.exp)" | ||
50 | ./net_defaultgw2.exp | ||
51 | |||
52 | echo "TESTING: network default gateway test 3 (net_defaultgw3.exp)" | ||
53 | ./net_defaultgw3.exp | ||
54 | |||
55 | echo "TESTING: netfilter (net_netfilter.exp)" | ||
56 | ./net_netfilter.exp | ||
57 | |||
58 | echo "TESTING: 4 bridges ARP (4bridges_arp.exp)" | ||
59 | ./4bridges_arp.exp | ||
60 | |||
61 | echo "TESTING: 4 bridges IP (4bridges_ip.exp)" | ||
62 | ./4bridges_ip.exp | ||