Guest User

Untitled

a guest
May 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. /etc/rc.conf
  2. hostname="gateway"
  3. server="gateway"
  4. ifconfig_nfe0="DHCP"
  5. ifconfig_rl0="inet 10.0.0.1 netmask 0xffffff00"
  6. gateway_enable="YES"
  7. pf_enable="YES"
  8. miniupnpd_enable="YES"
  9. dhcpd_enable="YES"
  10. dhcpd_ifaces="rl0"
  11. sshd_enable="YES"
  12. lighttpd_enable="YES"
  13. usbd_enable="YES"
  14. linux_enable="YES"
  15. sendmail_enable="NO"
  16.  
  17. /etc/pf.conf
  18. ext_if="nfe0"
  19. int_if="rl0"
  20. tcp_services="{ 1338 }"
  21. icmp_types="echoreq"
  22. comp1="10.0.0.2"
  23. set block-policy return
  24. set loginterface $ext_if
  25. set skip on lo
  26. scrub in
  27. nat on $ext_if from !($ext_if) -> ($ext_if:0)
  28. rdr-anchor "miniupnpd"
  29. rdr on $ext_if proto tcp from any to any port 1337 -> $comp1
  30. block in
  31. pass out keep state
  32. anchor "miniupnpd"
  33. antispoof quick for { lo $int_if }
  34. pass in on $ext_if inet proto tcp from any to ($ext_if) port $tcp_services flags S/SA keep state
  35. pass in on $ext_if inet proto tcp from any to $comp1 port 1337 flags S/SA synproxy state
  36. pass in inet proto icmp all icmp-type $icmp_types keep state
  37. pass in quick on $int_if
  38.  
  39. /usr/local/etc/dhcpd.conf
  40. option domain-name "gateway";
  41. option domain-name-servers 4.2.2.1, 4.2.2.2;
  42. option subnet-mask 255.255.255.0;
  43. default-lease-time 86400;
  44. max-lease-time 86400;
  45. ddns-update-style none;
  46. subnet 10.0.0.0 netmask 255.255.255.0 {
  47. range 10.0.0.100 10.0.0.254;
  48. option routers 10.0.0.1;
  49. }
  50. host pc {
  51. hardware ethernet 00:17:31:b2:31:1d;
  52. fixed-address 10.0.0.2;
  53. }
  54. host xbox {
  55. hardware ethernet 00:12:5a:fe:50:24;
  56. fixed-address 10.0.0.3;
  57. }
  58.  
  59. /etc/minupnpd.conf
  60. ext_ifname=nfe0
  61. listening_ip=10.0.0.1
  62. port=2689
  63. lease_file=/var/db/upnpd/upnpd.leases
  64. allow 0-65535 10.0.0.0/8 0-65535
  65. deny 0-65535 0.0.0.0/32 0-65535
Add Comment
Please, Sign In to add comment