Skip to content
Snippets Groups Projects
Commit 766fe086 authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove slash from ipv4 address

parent b6d70aba
No related branches found
No related tags found
No related merge requests found
......@@ -704,9 +704,9 @@ You can block ads for any devices connected to your local network by installing
** Set a static IP address
Once you've done that then ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually *192.168.1.1* or *192.168.1.254*.
Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually *192.168.1.1* or *192.168.1.254*.
When that's done select *About this system* from the control panel and see the IPv4 address (ignore the /24 part). You can use this as a DNS address in two ways:
When that's done select *About this system* from the control panel and see the IPv4 address. You can use this as a DNS address in two ways:
** On each client system within your local network
......
......@@ -89,7 +89,7 @@ function install_static_network {
function get_ipv4_address {
IPv4dev=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/dev/)print $(i+1)}')
echo $(ip -o -f inet addr show dev "$IPv4dev" | awk '{print $4}' | awk 'END {print}')
echo $(ip -o -f inet addr show dev "$IPv4dev" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
}
function get_ipv6_address {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment