mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-24 06:29:03 +01:00
Modify kernel version patch
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2465 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
46210cd6bb
commit
5de0a44eea
@ -560,6 +560,15 @@ read_yesno_with_timeout() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Print a heading with leading and trailing black lines
|
||||||
|
#
|
||||||
|
heading() {
|
||||||
|
echo
|
||||||
|
echo "$@"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Execution begins here
|
# Execution begins here
|
||||||
#
|
#
|
||||||
@ -944,40 +953,28 @@ case "$1" in
|
|||||||
$IPTABLES -L $IPT_OPTIONS
|
$IPTABLES -L $IPT_OPTIONS
|
||||||
echo
|
echo
|
||||||
packet_log 20
|
packet_log 20
|
||||||
echo
|
|
||||||
echo "NAT Table"
|
heading "NAT Table"
|
||||||
echo
|
|
||||||
$IPTABLES -t nat -L $IPT_OPTIONS
|
$IPTABLES -t nat -L $IPT_OPTIONS
|
||||||
echo
|
|
||||||
echo "Mangle Table"
|
heading "Mangle Table"
|
||||||
echo
|
|
||||||
$IPTABLES -t mangle -L $IPT_OPTIONS
|
$IPTABLES -t mangle -L $IPT_OPTIONS
|
||||||
echo
|
echo
|
||||||
cat /proc/net/ip_conntrack
|
cat /proc/net/ip_conntrack
|
||||||
echo
|
|
||||||
echo "Kernel"
|
heading "IP Configuration"
|
||||||
echo
|
|
||||||
cat /proc/version
|
|
||||||
echo
|
|
||||||
echo "IP Configuration"
|
|
||||||
echo
|
|
||||||
ip addr ls
|
ip addr ls
|
||||||
echo
|
|
||||||
echo "IP Stats"
|
heading "IP Stats"
|
||||||
echo
|
|
||||||
ip -stat link ls
|
ip -stat link ls
|
||||||
|
|
||||||
if qt mywhich brctl; then
|
if qt mywhich brctl; then
|
||||||
echo
|
heading "Bridges"
|
||||||
echo "Bridges"
|
|
||||||
echo
|
|
||||||
brctl show
|
brctl show
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
heading "/proc"
|
||||||
echo "/proc"
|
show_proc /proc/version
|
||||||
echo
|
|
||||||
|
|
||||||
show_proc /proc/sys/net/ipv4/ip_forward
|
show_proc /proc/sys/net/ipv4/ip_forward
|
||||||
show_proc /proc/sys/net/ipv4/icmp_echo_ignore_all
|
show_proc /proc/sys/net/ipv4/icmp_echo_ignore_all
|
||||||
|
|
||||||
@ -988,34 +985,24 @@ case "$1" in
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$(ip rule ls)" ]; then
|
if [ -n "$(ip rule ls)" ]; then
|
||||||
echo
|
heading "Routing Rules"
|
||||||
echo "Routing Rules"
|
|
||||||
echo
|
|
||||||
ip rule ls
|
ip rule ls
|
||||||
ip rule ls | while read rule; do
|
ip rule ls | while read rule; do
|
||||||
echo ${rule##* }
|
echo ${rule##* }
|
||||||
done | sort -u | while read table; do
|
done | sort -u | while read table; do
|
||||||
echo
|
heading "Table $table:"
|
||||||
echo "Table $table:"
|
|
||||||
echo
|
|
||||||
ip route ls table $table
|
ip route ls table $table
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo
|
heading "Routing Table"
|
||||||
echo "Routing Table"
|
|
||||||
echo
|
|
||||||
ip route ls
|
ip route ls
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
heading "ARP"
|
||||||
echo "ARP"
|
|
||||||
echo
|
|
||||||
arp -na
|
arp -na
|
||||||
|
|
||||||
if qt mywhich lsmod; then
|
if qt mywhich lsmod; then
|
||||||
echo
|
heading "Modules"
|
||||||
echo "Modules"
|
|
||||||
echo
|
|
||||||
lsmod | grep -E '^ip_|^ipt_|^iptable_'
|
lsmod | grep -E '^ip_|^ipt_|^iptable_'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user