Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. eth5 192.168.100.254 #Main IP
  2. eth5:2 192.168.100.2 #Virtual IP1
  3. eth5:3 192.168.100.3 #virtual IP2
  4. ....
  5. ....
  6. eth4:14 192.168.100.14 #virtual IP14
  7.  
  8. eth1: 192.168.100.1 #Main IP for LAN
  9. eth2: 219.91.xxx.185 #Main Public IP
  10. eth2:2 219.91.XXX.2 #sub public IP2
  11. ...
  12. ...
  13. eth2:14 219.91.xxx.14 #sub public IP14
  14.  
  15. **Input**
  16.  
  17. -A INPUT -i eth1 -j ACCEPT
  18. -A INPUT -i eth2 -j ACCEPT
  19.  
  20. **Forward**
  21.  
  22. -A FORWARD -i eth1 -o eth2 -j ACCEPT
  23. -A FORWARD -i eth2 -o eth1 -j ACCEPT
  24.  
  25. **DNAT**
  26.  
  27. -A PREROUTING -d 219.91.xxx.186/32 -j DNAT --to-destination 192.168.100.254
  28. -A PREROUTING -d 219.91.xxx.3/32 -j DNAT --to-destination 192.168.100.3
  29. -A PREROUTING -d 219.91.xxx.2/32 -j DNAT --to-destination 192.168.100.2
  30. ...
  31. ...
  32. -A PREROUTING -d 219.91.xxx.14/32 -j DNAT --to-destination 192.168.100.14
  33.  
  34. **SNAT**
  35.  
  36. -A POSTROUTING -s 192.168.100.254/32 -j SNAT --to-source 219.91.xxx.186
  37. -A PREROUTING -d 219.91.xxx.3/32 -j DNAT --to-destination 192.168.100.3
  38. -A PREROUTING -d 219.91.xxx.2/32 -j DNAT --to-destination 192.168.100.2
  39. ...
  40. ...
  41. -A PREROUTING -d 219.91.xxx.14/32 -j DNAT --to-destination 192.168.100.14
  42.  
  43. cat /etc/mailips
  44. example.com 192.168.100.4
  45.  
  46. cat /var/cpanel/cpnat
  47. 192.168.100.6 219.91.xxx.6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement