synproxy.sh (6e0bca03bd838aef7d5c64cd0fdf3068c66f8eb0) | synproxy.sh (06aac31aecb6028d346abc6b6cd54f58c12a1a32) |
---|---|
1# $FreeBSD$ 2 3. $(atf_get_srcdir)/utils.subr 4 5atf_test_case "synproxy" "cleanup" 6synproxy_head() 7{ 8 atf_set descr 'Basic synproxy test' 9 atf_set require.user root 10} 11 12synproxy_body() 13{ 14 pft_init 15 | 1# $FreeBSD$ 2 3. $(atf_get_srcdir)/utils.subr 4 5atf_test_case "synproxy" "cleanup" 6synproxy_head() 7{ 8 atf_set descr 'Basic synproxy test' 9 atf_set require.user root 10} 11 12synproxy_body() 13{ 14 pft_init 15 |
16 epair=$(pft_mkepair) | 16 epair=$(vnet_mkepair) |
17 ifconfig ${epair}a 192.0.2.1/24 up 18 route add -net 198.51.100.0/24 192.0.2.2 19 | 17 ifconfig ${epair}a 192.0.2.1/24 up 18 route add -net 198.51.100.0/24 192.0.2.2 19 |
20 link=$(pft_mkepair) | 20 link=$(vnet_mkepair) |
21 | 21 |
22 pft_mkjail alcatraz ${epair}b ${link}a | 22 vnet_mkjail alcatraz ${epair}b ${link}a |
23 jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up 24 jexec alcatraz ifconfig ${link}a 198.51.100.1/24 up 25 jexec alcatraz sysctl net.inet.ip.forwarding=1 26 | 23 jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up 24 jexec alcatraz ifconfig ${link}a 198.51.100.1/24 up 25 jexec alcatraz sysctl net.inet.ip.forwarding=1 26 |
27 pft_mkjail singsing ${link}b | 27 vnet_mkjail singsing ${link}b |
28 jexec singsing ifconfig ${link}b 198.51.100.2/24 up 29 jexec singsing route add default 198.51.100.1 30 31 jexec singsing /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf 32 33 jexec alcatraz pfctl -e 34 pft_set_rules alcatraz "set fail-policy return" \ 35 "scrub in all fragment reassemble" \ --- 24 unchanged lines hidden --- | 28 jexec singsing ifconfig ${link}b 198.51.100.2/24 up 29 jexec singsing route add default 198.51.100.1 30 31 jexec singsing /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf 32 33 jexec alcatraz pfctl -e 34 pft_set_rules alcatraz "set fail-policy return" \ 35 "scrub in all fragment reassemble" \ --- 24 unchanged lines hidden --- |