Advertisement
Guest User

Untitled

a guest
Jun 10th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. # -*- shell-script -*-
  2.  
  3. @def &FORWARD_PORT($proto, $port, $dest) = {
  4. table filter chain FORWARD interface eth1 outerface eth2 daddr $dest proto $proto dport $port ACCEPT;
  5. table nat chain PREROUTING interface eth1 daddr 83.xxx.xxx.xxx proto $proto dport $port DNAT to $dest;
  6. }
  7.  
  8. table filter {
  9. chain INPUT {
  10. policy DROP;
  11.  
  12. interface lo ACCEPT;
  13.  
  14. mod state state INVALID DROP;
  15. mod state state (ESTABLISHED RELATED) ACCEPT;
  16.  
  17. proto icmp ACCEPT;
  18.  
  19. proto tcp mod multiport destination-ports (
  20. 2144 # hyperic agent
  21. ssh
  22. http
  23. https
  24. ) ACCEPT;
  25.  
  26. }
  27. chain OUTPUT policy ACCEPT;
  28. chain FORWARD {
  29. policy DROP;
  30.  
  31. interface eth1 ACCEPT;
  32.  
  33. mod state state INVALID DROP;
  34. mod state state (ESTABLISHED RELATED) ACCEPT;
  35. }
  36. }
  37.  
  38. table nat {
  39. chain POSTROUTING {
  40. outerface eth0 saddr 192.168.xxx.xxx/24 SNAT to 83.xxx.xxx.xxx;
  41. }
  42. }
  43.  
  44. # db hyperic agent
  45. &FORWARD_PORT((tcp udp), 2145, 192.168.xxx.xxx);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement