Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. iptables -t nat -A PREROUTING -p tcp -d 1.2.3.4 -j DNAT --to-destination 127.0.0.1:12345
  2.  
  3. iptables -t nat -A POSTROUTING -p tcp -s 192.168.1.0/24 -d 1.2.3.4 -j SNAT --to-source 127.0.0.1
  4. iptables -t nat -A POSTROUTING -p tcp -s 192.168.1.0/24 -d 127.0.0.1 -j SNAT --to-source 127.0.0.1
  5.  
  6. root@vm8583:~# ip link add bogus type dummy
  7. root@vm8583:~# sysctl net.ipv4.conf.eth0.arp_ignore=3
  8. root@vm8583:~# ip addr add 10.0.0.1/32 bogus scope host
  9. root@vm8583:~# ip link set bogus up
  10. root@vm8583:~# ip link show bogus
  11. 4: bogus: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
  12. link/ether 5e:8b:38:f3:46:ce brd ff:ff:ff:ff:ff:ff
  13.  
  14. arp_ignore - INTEGER
  15. Define different modes for sending replies in response to
  16. received ARP requests that resolve local target IP addresses:
  17. . . .
  18. 3 - do not reply for local addresses configured with scope host,
  19. only resolutions for global and link addresses are replied
  20. 4-7 - reserved
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement