Lines Matching defs:n2
37 n2() { pretty 2 "$*"; maybe_exec ip netns exec $netns2 "$@"; }
104 n2 wg set wg0 \
118 n2 ping -c 10 -f -W 1 192.168.241.1
122 n2 ping6 -c 10 -f -W 1 fd00::1
126 n2 iperf3 -s -1 -B 192.168.241.2 &
133 n2 iperf3 -Z -t 3 -c fd00::1
138 n2 iperf3 -Z -t 3 -b 0 -u -c 192.168.241.1
141 n2 iperf3 -s -1 -B fd00::2 &
149 n2 iperf3 -p $(( 5200 + i )) -s -1 -B 192.168.241.2 &
164 n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
166 n2 ping -c 10 -f -W 1 192.168.241.1
171 read _ rx_bytes tx_bytes < <(n2 wg show wg0 transfer)
188 n2 wg set wg0 peer "$pub1" endpoint [::1]:1
198 n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
201 n2 ip route add 192.168.241.1/32 dev wg0 mtu 1299
202 n2 ping -c 1 -W 1 -s 1269 192.168.241.1
203 n2 ip route delete 192.168.241.1/32 dev wg0 mtu 1299
216 [[ $(n2 wg show wg0 endpoints) == "$pub1 127.212.121.99:9999" ]]
222 [[ $(n2 wg show wg0 endpoints) == "$pub1 [::1]:9998" ]]
229 n2 ncat -u 192.168.241.1 1111 <<<"X"
234 n2 wg set wg0 listen-port 9997
238 n2 ncat -u 192.168.241.1 1111 <<<"X"
246 n2 wg set wg0 private-key <(echo "$key2") listen-port 2 peer "$pub1" preshared-key <(echo "$psk") allowed-ips 192.168.241.1/32
249 n2 wg set wg0 peer "$pub3" preshared-key <(echo "$psk") allowed-ips 192.168.241.1/32 peer "$pub1" remove
251 n2 wg set wg0 peer "$pub3" remove
259 n2 wg set wg0 private-key <(echo "$key2") listen-port 2 peer "$pub1" preshared-key <(echo "$psk") allowed-ips fd00::5:1/128 endpoint 127.212.121.99:9998
269 n2 wg set wg1 listen-port 5 private-key <(echo "$key4") peer "$pub3" allowed-ips 192.168.241.1/32,fd00::1/128 endpoint [fd00::5:1]:5
329 n2 ping -W 1 -c 1 192.168.241.1
330 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.1:1" ]]
331 # Demonstrate n2 can still send packets to n1, since persistent-keepalive will prevent connection tracking entry from expiring (to see entries: `n0 conntrack -L`).
333 n2 ping -W 1 -c 1 192.168.241.1
349 n2 wg set wg1 private-key <(echo "$key3") listen-port 5 peer "$pub1" allowed-ips 192.168.242.1/32
376 n2 iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -d 192.168.241.0/24 -j SNAT --to 192.168.241.2
378 n2 bash -c 'printf 1 > /proc/sys/net/ipv4/ip_forward'
380 n2 wg set wg0 peer "$pub1" remove
385 n2 iptables -t nat -F
409 n2 bash -c 'printf 0 > /proc/sys/net/ipv6/conf/all/accept_dad'
411 n2 bash -c 'printf 0 > /proc/sys/net/ipv6/conf/veth2/accept_dad'
449 n2 wg set wg0 peer "$pub1" endpoint 10.0.0.1:1
450 n2 ping -W 1 -c 1 192.168.241.1
451 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.1:1" ]]
452 n2 wg set wg0 peer "$pub1" endpoint [fd00:aa::1]:1
453 n2 ping -W 1 -c 1 192.168.241.1
454 [[ $(n2 wg show wg0 endpoints) == "$pub1 [fd00:aa::1]:1" ]]
455 n2 wg set wg0 peer "$pub1" endpoint 10.0.0.2:1
456 n2 ping -W 1 -c 1 192.168.241.1
457 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.2:1" ]]
458 n2 wg set wg0 peer "$pub1" endpoint [fd00:aa::2]:1
459 n2 ping -W 1 -c 1 192.168.241.1
460 [[ $(n2 wg show wg0 endpoints) == "$pub1 [fd00:aa::2]:1" ]]
467 n2 wg set wg0 peer "$pub1" endpoint 10.50.0.1:1
468 n2 ping -W 1 -c 1 192.168.241.1
469 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.50.0.1:1" ]]
496 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.1:1" ]]
499 n2 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/veth4/rp_filter'
501 n2 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/all/rp_filter'
503 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.3:1" ]]
653 n2 wg set wg0 peer "$pub1" endpoint [fd00:aa::1]:1