Advertisement
alexeyshmalko

Untitled

Dec 21st, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ** lab7
  2. *** task
  3. | No. | Client part | Server | Special | Count | Log |
  4. | 5 | FTP to net | SMTP | IP in/out | In TCP | In from net |
  5. | | 10.18.49.0/24, | | 10.18.48.0/24 | | 10.18.51.0/24 |
  6. | | POP3 | | | | |
  7. *** solution
  8. #+begin_src sh
  9. ipfw add 1 allow ip from any to any via lo0
  10. ipfw add 2 count tcp from any to me
  11. ipfw add 3 allow log ip from 10.18.51.0/24 to me
  12. # FTP
  13. ipfw add 4 allow ip from me to 10.18.49.0/24 dst-port 20-21
  14. # POP3
  15. ipfw add 5 allow ip from me to any dst-port 110
  16. # SMTP
  17. ipfw add 6 allow ip from any to me dst-port 25
  18. # special
  19. ipfw add 7 allow ip from 10.18.48.0/24 to me
  20. ipfw add 8 allow ip from me to 10.18.48.0/24
  21. #+end_src
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement