Guest User

Untitled

a guest
Feb 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. eth1 Link encap:Ethernet HWaddr 00:0c:29:08:05:01
  2.  
  3. inet addr:172.16.21.1 Bcast:172.16.21.127 Mask:255.255.255.128
  4.  
  5. inet6 addr: fe80::20c:29ff:fe08:501/64 Scope:Link
  6.  
  7. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  8.  
  9. RX packets:526 errors:0 dropped:0 overruns:0 frame:0
  10.  
  11. TX packets:562 errors:0 dropped:0 overruns:0 carrier:0
  12.  
  13. collisions:0 txqueuelen:1000
  14.  
  15. RX bytes:44822 (43.7 KiB) TX bytes:40642 (39.6 KiB)
  16.  
  17. Interrupt:17 Base address:0x20a4
  18.  
  19.  
  20.  
  21. eth2 Link encap:Ethernet HWaddr 00:0c:29:08:05:0b
  22.  
  23. inet addr:192.168.1.81 Bcast:192.168.1.83 Mask:255.255.255.252
  24.  
  25. inet6 addr: fe80::20c:29ff:fe08:50b/64 Scope:Link
  26.  
  27. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  28.  
  29. RX packets:856 errors:0 dropped:0 overruns:0 frame:0
  30.  
  31. TX packets:909 errors:0 dropped:0 overruns:0 carrier:0
  32.  
  33. collisions:0 txqueuelen:1000
  34.  
  35. RX bytes:71421 (69.7 KiB) TX bytes:85064 (83.0 KiB)
  36.  
  37. Interrupt:17 Base address:0x2424
  38.  
  39.  
  40.  
  41. lo Link encap:Local Loopback
  42.  
  43. inet addr:127.0.0.1 Mask:255.0.0.0
  44.  
  45. inet6 addr: ::1/128 Scope:Host
  46.  
  47. UP LOOPBACK RUNNING MTU:65536 Metric:1
  48.  
  49. RX packets:47 errors:0 dropped:0 overruns:0 frame:0
  50.  
  51. TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
  52.  
  53. collisions:0 txqueuelen:0
  54.  
  55. RX bytes:4733 (4.6 KiB) TX bytes:4733 (4.6 KiB)
  56.  
  57. Kernel IP routing table
  58.  
  59. Destination Gateway Genmask Flags Metric Ref Use Iface
  60.  
  61. 0.0.0.0 172.16.21.1 0.0.0.0 UG 0 0 0 eth1
  62.  
  63. 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
  64.  
  65. 172.16.21.0 172.16.21.1 255.255.255.128 UG 0 0 0 eth1
  66.  
  67. 192.168.1.80 192.168.1.81 255.255.255.252 UG 0 0 0 eth2
  68.  
  69. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  70. listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
  71. 14:35:38.591460 IP 172.16.21.2 > 192.168.1.82: ICMP echo request, id 1, seq 71, length 40
  72. 14:35:43.126147 ARP, Request who-has router (00:0c:29:08:05:01 (oui Unknown)) tell 172.16.21.2, length 46
  73. 14:35:43.126189 ARP, Reply router is-at 00:0c:29:08:05:01 (oui Unknown), length 28
  74. 14:35:43.141954 IP 172.16.21.2 > 192.168.1.82: ICMP echo request, id 1, seq 72, length 40
  75. 14:36:08.894329 IP router.mdns > 224.0.0.251.mdns: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
  76. 14:36:09.658277 ARP, Request who-has 199.7.91.13 tell router, length 28
  77. 14:36:10.656763 ARP, Request who-has 199.7.91.13 tell router, length 28
  78. 14:36:10.707265 IP6 fe80::20c:29ff:fe08:501.mdns > ff02::fb.mdns: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
  79.  
  80. route add -net 192.168.1.80/30 gw 192.168.1.81 dev eth2
  81. route add -net 172.16.21.0/25 gw 172.16.21.1 dev eth1
  82.  
  83. sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  84. sudo iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
  85. sudo iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
  86.  
  87. sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
  88. sudo iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  89. sudo iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
Add Comment
Please, Sign In to add comment