Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
etc /
openvpn /
[ HOME SHELL ]
Name
Size
Permission
Action
client
[ DIR ]
drwxr-xr-x
server
[ DIR ]
drwxr-xr-x
update-resolv-conf
1.43
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : update-resolv-conf
#!/bin/bash # # Parses DHCP options from openvpn to update resolv.conf # To use set as 'up' and 'down' script in your openvpn *.conf: # up /etc/openvpn/update-resolv-conf # down /etc/openvpn/update-resolv-conf # # Used snippets of resolvconf script by Thomas Hood and Chris Hanson. # Licensed under the GNU GPL. See /usr/share/common-licenses/GPL. # # Example envs set from openvpn: # # foreign_option_1='dhcp-option DNS 193.43.27.132' # foreign_option_2='dhcp-option DNS 193.43.27.133' # foreign_option_3='dhcp-option DOMAIN be.bnc.ch' # if [ ! -x /sbin/resolvconf ] ; then logger "[OpenVPN:update-resolve-conf] missing binary /sbin/resolvconf"; exit 0; fi [ "$script_type" ] || exit 0 [ "$dev" ] || exit 0 split_into_parts() { part1="$1" part2="$2" part3="$3" } case "$script_type" in up) NMSRVRS="" SRCHS="" foreign_options=$(printf '%s\n' ${!foreign_option_*} | sort -t _ -k 3 -g) for optionvarname in ${foreign_options} ; do option="${!optionvarname}" echo "$option" split_into_parts $option if [ "$part1" = "dhcp-option" ] ; then if [ "$part2" = "DNS" ] ; then NMSRVRS="${NMSRVRS:+$NMSRVRS }$part3" elif [ "$part2" = "DOMAIN" ] ; then SRCHS="${SRCHS:+$SRCHS }$part3" fi fi done R="" [ "$SRCHS" ] && R="search $SRCHS " for NS in $NMSRVRS ; do R="${R}nameserver $NS " done echo -n "$R" | /sbin/resolvconf -a "${dev}.openvpn" ;; down) /sbin/resolvconf -d "${dev}.openvpn" ;; esac
Close