aboutsummaryrefslogtreecommitdiffstats
path: root/test/network
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-05-03 09:27:26 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-05-03 09:27:26 -0400
commitf36842dfdf11412dadee89d2e32ebbecc2f8a37e (patch)
tree062227fe715506bc033525157e6fc22e0ff43ae7 /test/network
parentnetworking features testing (diff)
downloadfirejail-f36842dfdf11412dadee89d2e32ebbecc2f8a37e.tar.gz
firejail-f36842dfdf11412dadee89d2e32ebbecc2f8a37e.tar.zst
firejail-f36842dfdf11412dadee89d2e32ebbecc2f8a37e.zip
networking features testing
Diffstat (limited to 'test/network')
-rwxr-xr-xtest/network/configure24
-rwxr-xr-xtest/network/network.sh62
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
3brctl addbr br0
4ifconfig br0 10.10.20.1/29 up
5# NAT masquerade
6iptables -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
10brctl addbr br1
11ifconfig br1 10.10.30.1/24 up
12brctl addbr br2
13ifconfig br2 10.10.40.1/24 up
14brctl addbr br3
15ifconfig br3 10.10.50.1/24 up
16brctl addbr br4
17ifconfig br4 10.10.60.1/24 up
18ip link add link eth0 name eth0.5 type vlan id 5
19/sbin/ifconfig eth0.5 10.10.205.10/24 up
20ip link add link eth0 name eth0.6 type vlan id 6
21/sbin/ifconfig eth0.6 10.10.206.10/24 up
22ip 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
6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8
9echo "TESTING: network profile (net_profile.exp)"
10./net_profile.exp
11
12echo "TESTING: bandwidth (bandwidth.exp)"
13./bandwidth.exp
14
15echo "TESTING: IPv6 support (ip6.exp)"
16./ip6.exp
17
18echo "TESTING: local network (net_local.exp)"
19./net_local.exp
20
21echo "TESTING: no network (net_none.exp)"
22./net_none.exp
23
24echo "TESTING: network IP (net_ip.exp)"
25./net_ip.exp
26
27echo "TESTING: network MAC (net_mac.exp)"
28sleep 2
29./net_mac.exp
30
31echo "TESTING: network MTU (net_mtu.exp)"
32./net_mtu.exp
33
34echo "TESTING: network hostname (hostname.exp)"
35./hostname.exp
36
37echo "TESTING: network bad IP (net_badip.exp)"
38./net_badip.exp
39
40echo "TESTING: network no IP test 1 (net_noip.exp)"
41./net_noip.exp
42
43echo "TESTING: network no IP test 2 (net_noip2.exp)"
44./net_noip2.exp
45
46echo "TESTING: network default gateway test 1 (net_defaultgw.exp)"
47./net_defaultgw.exp
48
49echo "TESTING: network default gateway test 2 (net_defaultgw2.exp)"
50./net_defaultgw2.exp
51
52echo "TESTING: network default gateway test 3 (net_defaultgw3.exp)"
53./net_defaultgw3.exp
54
55echo "TESTING: netfilter (net_netfilter.exp)"
56./net_netfilter.exp
57
58echo "TESTING: 4 bridges ARP (4bridges_arp.exp)"
59./4bridges_arp.exp
60
61echo "TESTING: 4 bridges IP (4bridges_ip.exp)"
62./4bridges_ip.exp