[] # tcpdump -nS -c2 icmp -i tun0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
09:44:05.873379 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1707, seq 1, length 64
09:44:06.881022 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1707, seq 2, length 64
2 packets captured
2 packets received by filter
0 packets dropped by kernel
Am I correct in interpreting this as saying the server sends the ping request out and gets the response but fails to send the response back to the client?
When you say test pre/post-nat do you mean test with the nat turned off and then turned on? Here is the nat turned off
[] # tcpdump -nS -c2 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:55:24.623777 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1725, seq 1, length 64
09:55:25.632580 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1725, seq 2, length 64
2 packets captured
2 packets received by filter
0 packets dropped by kernel
[] #
[] # tcpdump -nS -c2 icmp -i tun0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
09:56:14.887436 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1727, seq 1, length 64
09:56:15.887555 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1727, seq 2, length 64
2 packets captured
2 packets received by filter
0 packets dropped by kernel
And here is with the nat turned on:
[] # iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
[] # tcpdump -nS -c2 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:58:19.758268 IP 45.33.15.172 > 8.8.8.8: ICMP echo request, id 1730, seq 1, length 64
09:58:19.758842 IP 8.8.8.8 > 45.33.15.172: ICMP echo reply, id 1730, seq 1, length 64
2 packets captured
2 packets received by filter
0 packets dropped by kernel
[] #
[] #tcpdump -nS -c2 icmp -i tun0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
09:59:05.688716 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1732, seq 1, length 64
09:59:06.697847 IP 10.8.0.14 > 8.8.8.8: ICMP echo request, id 1732, seq 2, length 64
2 packets captured
2 packets received by filter
0 packets dropped by kernel