Advertisement
ebertek

Untitled

Feb 10th, 2025
83
0
167 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | Software | 0 0
  1. #!/bin/sh
  2.  
  3. sysctl -w net.core.somaxconn=65535
  4. sysctl -w net.ipv4.conf.all.src_valid_mark=1
  5.  
  6. # Create the necessary file structure for /dev/net/tun
  7. if ( [ ! -c /dev/net/tun ] ); then
  8.   if ( [ ! -d /dev/net ] ); then
  9.     mkdir -m 755 /dev/net
  10.   fi
  11.   mknod /dev/net/tun c 10 200
  12.   chmod 0755 /dev/net/tun
  13. fi
  14.  
  15. # Load the tun module if not already loaded
  16. if ( !(lsmod | grep -q "^tun\s") ); then
  17.   insmod /lib/modules/tun.ko
  18. fi
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement