Public feed
#599431
iptables -L -nv
Chain INPUT (policy ACCEPT 5370 packets, 1088K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 4162 packets, 951K bytes)
pkts bytes target prot opt in out source destination
++++++++++++++++
iptables -t nat -L -nv
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 29 packets, 2348 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 18 packets, 1424 bytes)
pkts bytes target prot opt in out source destination
+++++++++++++++++++++++
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 2000 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.2 0.0.0.0 UG 2000 0 0 wlan0
++++++++++++++++++++++
ping -c4 10.0.1.1
PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data.
64 bytes from 10.0.1.1: icmp_seq=1 ttl=64 time=0.382 ms
64 bytes from 10.0.1.1: icmp_seq=2 ttl=64 time=0.101 ms
64 bytes from 10.0.1.1: icmp_seq=3 ttl=64 time=0.100 ms
64 bytes from 10.0.1.1: icmp_seq=4 ttl=64 time=0.095 ms
--- 10.0.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.095/0.169/0.382/0.123 ms
++++++++++++++++
iptables -t nat -I OUTPUT -d 10.10.0.1 -j DNAT --to 10.0.1.1
++++++++++++++++++
iptables -t nat -L -nv
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 29 packets, 2348 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 18 packets, 1424 bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT all -- * * 0.0.0.0/0 10.10.0.1 to:10.0.1.1
++++++++++++++++++++++
Now I'm doing: ping -c4 10.10.0.1
while running:
tcpdump -i any icmp
01:28:59.937499 IP 192.168.1.108 > 10.10.0.1: ICMP echo request, id 65329, seq 1, length 64
01:29:00.937507 IP 192.168.1.108 > 10.10.0.1: ICMP echo request, id 65329, seq 2, length 64
01:29:01.938351 IP 192.168.1.108 > 10.10.0.1: ICMP echo request, id 65329, seq 3, length 64
01:29:02.939202 IP 192.168.1.108 > 10.10.0.1: ICMP echo request, id 65329, seq 4, length 64