Advertisement
medialjanos666

Untitled

Sep 27th, 2023 (edited)
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.18 KB | None | 0 0
  1. ~ # cat /etc/conf.d/net
  2. # WAN #
  3. #
  4. config_enp0s31f6="dhcp"
  5. #
  6. # LAN #
  7. #
  8. bridge_br0="enp1s0 enp2s0f0 enp2s0f1 enp2s0f2 enp2s0f3"
  9. config_br0="192.168.1.11/24 2001:db8::11/64"
  10. bridge_ageing_time_br0="0"
  11. bridge_stp_state_br0="1"
  12. bridge_forward_delay_br0="0"
  13. bridge_hello_time_br0="1000"
  14. bridge_bridge_priority_br0="0"
  15. #
  16. # WWAN (backup) #
  17. #modules_wlan0="wpa_supplicant"
  18. #config_wlp0s20f0u10="dhcp"
  19.  
  20.  
  21.  
  22. cat /var/lib/iptables/rules-save
  23. # Generated by iptables-save v1.8.9 on Wed Sep 20 12:29:02 2023
  24. *filter
  25. :INPUT ACCEPT [27797241404:15907207518606]
  26. :FORWARD DROP [196976:10714156]
  27. :OUTPUT ACCEPT [38678167935:37148549968304]
  28. [240133242:191854119009] -A INPUT -i lo -j ACCEPT
  29. [109322591620:196714361153610] -A INPUT -i br0 -j ACCEPT
  30. [29446:1278124] -A INPUT ! -i br0 -p tcp -m tcp --dport 22 -j REJECT --reject-with icmp-port-unreachable
  31. [24916:1592823] -A INPUT ! -i br0 -p udp -m udp --dport 53 -j REJECT --reject-with icmp-port-unreachable
  32. [9619:4386610] -A INPUT ! -i br0 -p udp -m udp --dport 67 -j REJECT --reject-with icmp-port-unreachable
  33. [243063:55575386] -A INPUT ! -i br0 -p udp -m udp --dport 137:139 -j REJECT --reject-with icmp-port-unreachable
  34. [200:10821] -A INPUT ! -i br0 -p tcp -m tcp --dport 58846 -j REJECT --reject-with icmp-port-unreachable
  35. [912:38540] -A INPUT ! -i br0 -p tcp -m tcp --dport 8112 -j REJECT --reject-with icmp-port-unreachable
  36. [1982:83316] -A INPUT ! -i br0 -p tcp -m tcp --dport 8200 -j REJECT --reject-with icmp-port-unreachable
  37. [8850223624:9586955332030] -A FORWARD -d 192.168.1.0/24 -i enp0s31f6 -j ACCEPT
  38. [4512888605:580052774428] -A FORWARD -s 192.168.1.0/24 -i br0 -j ACCEPT
  39. COMMIT
  40. # Completed on Wed Sep 20 12:29:02 2023
  41. # Generated by iptables-save v1.8.9 on Wed Sep 20 12:29:02 2023
  42. *mangle
  43. :PREROUTING ACCEPT [304104204946:391360519978101]
  44. :INPUT ACCEPT [280120422100:374135947100518]
  45. :FORWARD ACCEPT [23945083345:17219713113758]
  46. :OUTPUT ACCEPT [85136553984:86645296768663]
  47. :POSTROUTING ACCEPT [109116823485:103873796421364]
  48. COMMIT
  49. # Completed on Wed Sep 20 12:29:02 2023
  50. # Generated by iptables-save v1.8.9 on Wed Sep 20 12:29:02 2023
  51. *nat
  52. :PREROUTING ACCEPT [1883218325:173042805551]
  53. :INPUT ACCEPT [1704539209:149579813533]
  54. :OUTPUT ACCEPT [858394002:63741400962]
  55. :POSTROUTING ACCEPT [0:0]
  56. [999803407:82679354670] -A POSTROUTING -j MASQUERADE
  57.  
  58.  
  59.  
  60. cat /etc/local.d/qos.start
  61. #!/bin/sh
  62.  
  63. ## Paths and definition
  64. ext=enp0s31f6 # Change for your device!
  65. ext_ingress=ifb0 # Use a unique ifb per rate limiter!
  66. # Set these as per your provider's settings, at 90% to start with
  67. ext_up=20Mbit # Max theoretical: for this example, up is 7.5Mbit
  68. ext_down=500Mbit # Max theoretical: for this example, down is 90Mbit
  69. #### commands ####
  70. tc qdisc del dev $ext root
  71. tc qdisc del dev $ext ingress
  72. tc qdisc add dev $ext root cake bandwidth $ext_up
  73. tc qdisc add dev $ext handle ffff: ingress
  74. ifconfig $ext_ingress up
  75. ifconfig $ext_ingress txqueuelen 1000
  76. tc qdisc del dev $ext_ingress root
  77. tc qdisc add dev $ext_ingress root cake bandwidth $ext_down #besteffort
  78. tc filter add dev $ext parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev $ext_ingress
  79.  
  80.  
  81.  
  82. cat /etc/ddclient.conf
  83. protocol=noip
  84. server=dynupdate.no-ip.com
  85. use=if, if=enp0s31f6
  86. login=aha...
  87. password=aha...
  88. aha.ddns.net
  89.  
  90.  
  91.  
  92. cat /etc/sysctl.conf
  93. # /etc/sysctl.conf
  94. #
  95. # For more information on how this file works, please see
  96. # the manpages sysctl(8) and sysctl.conf(5).
  97. #
  98. # In order for this file to work properly, you must first
  99. # enable 'Sysctl support' in the kernel.
  100. #
  101. # Look in /proc/sys/ for all the things you can setup.
  102. #
  103.  
  104. # When the kernel panics, automatically reboot in 3 seconds
  105. kernel.panic = 3
  106.  
  107. # WAN-LAN IPv4 router settings
  108. net.ipv4.ip_forward=1
  109. net.ipv4.conf.default.rp_filter = 1
  110. net.ipv4.conf.all.rp_filter = 1
  111. #net.ipv4.conf.default.log_martians=0
  112. net.ipv4.conf.all.log_martians=0
  113. #net.ipv6.conf.all.autoconf=0
  114. #net.ipv6.conf.default.autoconf=0
  115. #net.ipv6.conf.all.accept_ra=0
  116. #net.ipv6.conf.default.accept_ra=0
  117.  
  118. # page cache, IO, FS tweaks
  119. fs.inotify.max_user_watches=524288
  120. vm.dirty_background_ratio = 25
  121. vm.dirty_ratio = 50
  122. vm.dirty_expire_centisecs = 0
  123. vm.dirty_writeback_centisecs = 0
  124. #vm.vfs_cache_pressure = 50
  125. #vm.swappiness = 0
  126.  
  127. # custom network socket tuning test
  128. net.core.somaxconn = 65535
  129. #net.core.netdev_max_backlog = 250000
  130. #net.ipv4.ipfrag_max_dist = 1000
  131. net.ipv4.tcp_ecn = 1
  132. net.ipv4.tcp_invalid_ratelimit = 0
  133. net.ipv4.tcp_low_latency = 1
  134. net.ipv4.tcp_max_syn_backlog = 250000
  135. #net.ipv4.tcp_max_reordering = 1000
  136. net.ipv4.tcp_retrans_collapse = 0
  137. #net.ipv4.tcp_syncookies = 0
  138. net.ipv4.tcp_fastopen = 3
  139. net.ipv4.icmp_echo_ignore_broadcasts = 0
  140. net.ipv4.icmp_ratelimit = 0
  141. #
  142. #net.core.rmem_max = 4194304
  143. #net.core.wmem_max = 4194304
  144. #net.core.rmem_default = 4194304
  145. #net.core.wmem_default = 4194304
  146. #net.core.optmem_max = 4194304
  147. #net.ipv4.tcp_rmem = 4096 87380 4194304
  148. #net.ipv4.tcp_wmem = 4096 65536 4194304
  149.  
  150.  
  151.  
  152. cat /etc/samba/smb.conf
  153. [global]
  154. #smb ports = 2222 2000
  155. server string = Samba Server %v
  156. workgroup = WORKGROUP
  157. domain master = yes
  158. wins support = yes
  159. username map = /etc/samba/smbusers
  160. #unix password sync = yes
  161. #passwd program = /bin/passwd %u
  162. #server min protocol = SMB2
  163. vfs objects = acl_xattr btrfs io_uring
  164. inherit owner = yes
  165. inherit permissions = yes
  166. inherit acls = yes
  167. fstype = Samba
  168. #block size = 65536
  169. #socket options = TCP_NODELAY IPTOS_LOWDELAY
  170. load printers = no
  171. printcap name = /dev/null
  172. #aio read size = 1
  173. #aio write size = 1
  174. #aio max threads = 2
  175. #aio write behind = true
  176.  
  177. [data]
  178. path = /mnt/data
  179. writable = yes
  180. valid users = én
  181. hosts allow = 192.168.1.
  182.  
  183. [surveillance]
  184. path = /mnt/data/surveillance
  185. writable = yes
  186. valid users = én és más
  187.  
  188. [temp]
  189. path = /mnt/temp
  190. writable = yes
  191. valid users = én
  192. hosts allow = 192.168.1.
  193.  
  194.  
  195.  
  196. ~ # cat /etc/udev/rules.d/60-ioschedulers.rules
  197. # set scheduler bfq for all SATA drives
  198. ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
  199. #ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/read_ahead_kb}="0"
  200. # set scheduler none for all NVMe drives
  201. ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
  202.  
  203.  
  204.  
  205. ~ # cat /etc/dhcpcd.conf
  206. noipv6rs
  207. noipv6
  208. # A sample configuration for dhcpcd.
  209. # See dhcpcd.conf(5) for details.
  210.  
  211. # Allow users of this group to interact with dhcpcd via the control socket.
  212. #controlgroup wheel
  213.  
  214. # Inform the DHCP server of our hostname for DDNS.
  215. hostname
  216.  
  217. # Use the hardware address of the interface for the Client ID.
  218. clientid
  219. # or
  220. # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
  221. # Some non-RFC compliant DHCP servers do not reply with this set.
  222. # In this case, comment out duid and enable clientid above.
  223. #duid
  224.  
  225. # Persist interface configuration when dhcpcd exits.
  226. persistent
  227.  
  228. # vendorclassid is set to blank to avoid sending the default of
  229. # dhcpcd-<version>:<os>:<machine>:<platform>
  230. vendorclassid
  231.  
  232. # A list of options to request from the DHCP server.
  233. option domain_name_servers, domain_name, domain_search
  234. option classless_static_routes
  235. # Respect the network MTU. This is applied to DHCP routes.
  236. option interface_mtu
  237.  
  238. # Request a hostname from the network
  239. option host_name
  240.  
  241. # Most distributions have NTP support.
  242. option ntp_servers
  243.  
  244. # Rapid commit support.
  245. # Safe to enable by default because it requires the equivalent option set
  246. # on the server to actually work.
  247. option rapid_commit
  248.  
  249. # A ServerID is required by RFC2131.
  250. require dhcp_server_identifier
  251.  
  252. # Generate SLAAC address using the Hardware Address of the interface
  253. #slaac hwaddr
  254. # OR generate Stable Private IPv6 Addresses based from the DUID
  255. slaac private
  256.  
  257. # Custom edits
  258. noarp
  259.  
  260. # define static profile (to boot smoothly withouth the cablemodem)
  261. timeout 10
  262. profile static_enp0s31f6
  263. static ip_address=192.168.100.11/24
  264. static routers=192.168.100.1
  265. static domain_name_servers=192.168.100.1
  266. interface enp0s31f6
  267. #fallback static_enp0s31f6
  268.  
  269.  
  270.  
  271. ~ # cat /etc/dnsmasq.conf
  272. interface=br0
  273. no-ping
  274. dhcp-range=192.168.1.12,192.168.1.250,20m
  275. dhcp-range=2001:db8::12,2001:db8::250,20m
  276. enable-ra
  277. #local=/localnet/
  278. domain=aha.ddns.net
  279. dhcp-host=aa:aa:aa:aa:aa:aa,WiFi_AP_1,192.168.1.akármi
  280. ... és így tovább
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement