Advertisement
Guest User

Untitled

a guest
May 30th, 2013
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. root@open:~# sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
  2. root@open:~# iptables-save
  3. # Generated by iptables-save v1.4.14 on Thu May 30 19:02:39 2013
  4. *nat
  5. :PREROUTING ACCEPT [0:0]
  6. :INPUT ACCEPT [0:0]
  7. :OUTPUT ACCEPT [0:0]
  8. :POSTROUTING ACCEPT [0:0]
  9. -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
  10. -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
  11. COMMIT
  12. # Completed on Thu May 30 19:02:39 2013
  13. # Generated by iptables-save v1.4.14 on Thu May 30 19:02:39 2013
  14. *filter
  15. :INPUT ACCEPT [144:11234]
  16. :FORWARD ACCEPT [0:0]
  17. :OUTPUT ACCEPT [145:16292]
  18. COMMIT
  19. # Completed on Thu May 30 19:02:39 2013
  20. root@open:~# iptables --list
  21. Chain INPUT (policy ACCEPT)
  22. target prot opt source destination
  23.  
  24. Chain FORWARD (policy ACCEPT)
  25. target prot opt source destination
  26.  
  27. Chain OUTPUT (policy ACCEPT)
  28. target prot opt source destination
  29. root@open:~# sudo iptables-save
  30. # Generated by iptables-save v1.4.14 on Thu May 30 19:02:59 2013
  31. *nat
  32. :PREROUTING ACCEPT [0:0]
  33. :INPUT ACCEPT [0:0]
  34. :OUTPUT ACCEPT [1:66]
  35. :POSTROUTING ACCEPT [1:66]
  36. -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
  37. -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
  38. COMMIT
  39. # Completed on Thu May 30 19:02:59 2013
  40. # Generated by iptables-save v1.4.14 on Thu May 30 19:02:59 2013
  41. *filter
  42. :INPUT ACCEPT [205:15732]
  43. :FORWARD ACCEPT [0:0]
  44. :OUTPUT ACCEPT [203:24313]
  45. COMMIT
  46. # Completed on Thu May 30 19:02:59 2013
  47. root@open:~# iptables --list
  48. Chain INPUT (policy ACCEPT)
  49. target prot opt source destination
  50.  
  51. Chain FORWARD (policy ACCEPT)
  52. target prot opt source destination
  53.  
  54. Chain OUTPUT (policy ACCEPT)
  55. target prot opt source destination
  56. root@open:~# sudo iptables --list
  57. Chain INPUT (policy ACCEPT)
  58. target prot opt source destination
  59.  
  60. Chain FORWARD (policy ACCEPT)
  61. target prot opt source destination
  62.  
  63. Chain OUTPUT (policy ACCEPT)
  64. target prot opt source destination
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement