wireless networking – Unable to print via dual band wi-fi

I used to be able to print to my HP Officejet Pro 8610 printer until I upgraded my wi-fi to using a single dual-band AC2200 Nest router. The printer is connected to wi-fi with a valid IP address (196.168.86.5). I tried removing and then reinstalling the printer to the printer list on my mac. The mac was aware of the printer (it listed the printer in the list of possible devices to add) but when I tried to add it I got the error message:

Unable to connect to 'HP Officeject Pro 8610 (1ED6EE)._ipp._tcp.local.' due to an error.

When I use the command “arp -a” from my mac I can see the printer:

mac-mini-2:~> arp -a
hp1ed6ee.lan (192.168.86.5) at fc:3f:db:1e:d6:f0 on en1 ifscope (ethernet)
epson5b8b9d.lan (192.168.86.36) at 0:26:ab:5b:8b:9d on en1 ifscope (ethernet)

I also have an Epson WorkForce 630 printer on this wi-fi network which I can print to. I am able to ping the Epson printer but not the HP printer (I get “Request timeout” messages).

I read on the internet that the problem could be that a printer using the 2.4 GHz band would not talk to a device on the 5 GHz band and indeed the HP printer is on the 2.4 GHz band and my mac is using the 5 GHz band. But the Epson printer also uses the 2.4 GHz band so that cannot be the whole story. Unfortunately, with the Nest router, it is not possible to switch my mac to using the 2.4 GHz band (at least not that I can see). I tried using a 2nd mac and had the same problem.

networking – Ubuntu 20.04 constantly drops wifi

Since a few days, my laptop with an intel 9560ac and Ubuntu 20.04 (livepatch on and up to date), started constantly dropping the wifi. Every 5 seconds on average. It asks for the password, connects, drops, asks for the password, over and over. This never happened before.

Any help would be greatly appreciated!

Here’s what I found out with sudo journalctl -b 0 /usr/sbin/NetworkManager but I can’t make heads or tails out of it. The router didn’t change, it’s a Linksys Deco.

Thanks!


sep 25 11:49:52 winston-wolfe NetworkManager(1289): <info>  (1601027392.4189) device (wlo1): supplicant interface state: associating -> associated
sep 25 11:49:52 winston-wolfe NetworkManager(1289): <info>  (1601027392.4189) device (p2p-dev-wlo1): supplicant management interface state: associating -> associated
sep 25 11:49:52 winston-wolfe NetworkManager(1289): <info>  (1601027392.4318) device (wlo1): supplicant interface state: associated -> 4-way handshake
sep 25 11:49:52 winston-wolfe NetworkManager(1289): <info>  (1601027392.4318) device (p2p-dev-wlo1): supplicant management interface state: associated -> 4-way handshake
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <warn>  (1601027396.5121) sup-iface(0x563245dc7210,wlo1): connection disconnected (reason 2)
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.5172) device (wlo1): supplicant interface state: 4-way handshake -> disconnected
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.5176) device (wlo1): Activation: (wifi) disconnected during association, asking for new key
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.5177) device (wlo1): state change: config -> need-auth (reason 'supplicant-disconnect', sys-iface-state: 'managed')
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.5181) device (p2p-dev-wlo1): supplicant management interface state: 4-way handshake -> disconnected
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.6173) device (wlo1): supplicant interface state: disconnected -> scanning
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.6173) device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.7215) device (wlo1): supplicant interface state: scanning -> inactive
sep 25 11:49:56 winston-wolfe NetworkManager(1289): <info>  (1601027396.7215) device (p2p-dev-wlo1): supplicant management interface state: scanning -> inactive
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.7926) device (wlo1): state change: need-auth -> deactivating (reason 'new-activation', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.7931) manager: NetworkManager state is now CONNECTED_LOCAL
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.7943) device (wlo1): disconnecting for new activation request.
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.7944) audit: op="connection-activate" uuid="6df5bc60-2d2b-49d8-824b-79712bcf2c44" name="codenet" pid=2468 uid=1000 result="success"
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <warn>  (1601027397.7996) device (wlo1): Deactivation failed: GDBus.Error:fi.w1.wpa_supplicant1.NotConnected: This interface is not connected
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.7996) device (wlo1): state change: deactivating -> disconnected (reason 'new-activation', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8005) device (wlo1): Activation: starting connection 'codenet' (6df5bc60-2d2b-49d8-824b-79712bcf2c44)
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8013) device (wlo1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8016) manager: NetworkManager state is now CONNECTING
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8019) device (wlo1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8039) device (wlo1): Activation: (wifi) access point 'codenet' has security, but secrets are required.
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8039) device (wlo1): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8041) sup-iface(0x563245dc7210,wlo1): wps: type pbc start...
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8063) device (wlo1): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8066) device (wlo1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8069) device (wlo1): Activation: (wifi) connection 'codenet' has security, and secrets exist.  No new secrets needed.
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8069) Config: added 'ssid' value 'codenet'
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8069) Config: added 'scan_ssid' value '1'
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8069) Config: added 'bgscan' value 'simple:30:-65:300'
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8069) Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK'
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.8070) Config: added 'psk' value '<hidden>'
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.9236) device (wlo1): supplicant interface state: inactive -> authenticating
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.9236) device (p2p-dev-wlo1): supplicant management interface state: inactive -> authenticating
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.9679) device (wlo1): supplicant interface state: authenticating -> associating
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.9679) device (p2p-dev-wlo1): supplicant management interface state: authenticating -> associating
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.9837) device (wlo1): supplicant interface state: associating -> associated
sep 25 11:49:57 winston-wolfe NetworkManager(1289): <info>  (1601027397.9838) device (p2p-dev-wlo1): supplicant management interface state: associating -> associated
sep 25 11:49:58 winston-wolfe NetworkManager(1289): <info>  (1601027398.0208) device (wlo1): supplicant interface state: associated -> 4-way handshake
sep 25 11:49:58 winston-wolfe NetworkManager(1289): <info>  (1601027398.0209) device (p2p-dev-wlo1): supplicant management interface state: associated -> 4-way handshake
sep 25 11:50:02 winston-wolfe NetworkManager(1289): <warn>  (1601027402.1023) sup-iface(0x563245dc7210,wlo1): connection disconnected (reason 2)
sep 25 11:50:02 winston-wolfe NetworkManager(1289): <info>  (1601027402.1074) device (wlo1): supplicant interface state: 4-way handshake -> disconnected
sep 25 11:50:02 winston-wolfe NetworkManager(1289): <info>  (1601027402.1079) device (wlo1): Activation: (wifi) disconnected during association, asking for new key
sep 25 11:50:02 winston-wolfe NetworkManager(1289): <info>  (1601027402.1079) device (wlo1): state change: config -> need-auth (reason 'supplicant-disconnect', sys-iface-state: 'managed')

wi fi – What is the difference between connecting to Wi-fi network by tap(manually) and automatic (when there is no other available networks)

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

networking – Wifi networks not appearing, “device not managed”

Device is an Alpha Aetheros AR9271, OS is actually the Ubuntu variant Bodhi.

The external wifi adapter is connected and is listed as detected. However networks do not appear and I get a “device not managed” error.

I changed FALSE to TRUE in etc/NetworkManager/NetworkManager.conf, it fixed “device not managed” for the ethernet, but not for the wireless.

firefox – System just freezes, everything just stops including mouse and even the wifi gets disconnected from mobile hotspot

My system was working fine but after the changes in past two days I started getting this problem.

The Changes I made: I replaced my old HDD with a new SSD two days ago and installed Linux on it. And yesterday there was a kernel update in the update manager.

How problem started occurring: After the update and 3 or 4 reboots, when I was installing wine through terminal system freezed and I had to do hard reboot, then again when wine was installed I was installing Docky from 18.04’s repository it again freezed.

The third and fourth time it freezed right after booting up when I launched firefox.

After some googled suggestions I did a smartctl. So can you tell me weather it’s a system error or the SSD’s broken.

Here are smartctl‘s results in the given : link

networking – Unstable wifi connection on Wireless 8260

I have tried

1.

sudo -i
echo "options rtl8723be fwlps=0"  >  /etc/modprobe.d/rtl8723be.conf
modprobe -r rtl8723be
modprobe rtl8723be
exit
  1. Ignore IPv6

  2. change REGDOMAIN in crda

  3. editing /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and changed the value from 3 to 2, saved changes and rebooted.

yet my connection is still very unstable, I can get 50mb/s down sometimes (good speed for my internet plan) but sometimes it doesn’t even load webpages and chrome gives me a no internet detected on webpages, it can alternate between the 2 in the span of 30 mins.

linux – Iptables rules as script but it blocks usb wifi adapter and vpn

i found this script online , when i execute it, it causes only 2 problems

1 – USB WiFi adapter stay blocked – rules applies only on internal WiFi

2- i can not connect to any VPN

what changes do i have to make inside this script

thanks in advice

#!/bin/sh

###############################################################################

###############################################################################

AWK=which awk
ECHO=which echo
GREP=which grep
IFCONFIG=which ifconfig
IPv4TABLES=which iptables
IPv6TABLES=which ip6tables
LS=which ls
SUDO=which sudo

ROOT_DIR=”/root”

###############################################################################

log() {
if ( $# -gt 0 ); then
now=date "+%x %T"
$ECHO -e “($now) $1”
else
$ECHO
fi
}

###############################################################################

disable() {
for file in $@
do
$SUDO $ECHO 0 > $file
done
}

###############################################################################

enable() {
for file in $@
do
$SUDO $ECHO 1 > $file
done
}

###############################################################################

enable_broadcast_echo_protection() {
if ( -e /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts ); then
log “{IGNORE} tt ICMP echo broadcasts”
enable /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
fi
}

###############################################################################

disable_source_routed_packets() {
if ( -e /proc/sys/net/ipv4/conf/all/accept_source_route ); then
log “{DISABLE} tt source route”
for iter in /proc/sys/net/ipv4/conf/*/accept_source_route
do
disable $iter
done
fi
}

###############################################################################

disable_icmp_redirects() {
if ( -e /proc/sys/net/ipv4/conf/all/accept_redirects ); then
log “{DISABLE} tt ICMP redirects”
for iter in /proc/sys/net/ipv4/conf/*/accept_redirects
do
disable $iter
done
fi
}

###############################################################################

disable_ip_forwarding() {
if ( -e /proc/sys/net/ipv4/ip_forward ); then
log “{DISABLE} tt IP forwarding”
disable /proc/sys/net/ipv4/ip_forward
fi
}

###############################################################################

enable_source_address_verification() {
if ( -e /proc/sys/net/ipv4/conf/all/rp_filter ); then
log “{ENABLE} tt reverse path filtering”
for iter in /proc/sys/net/ipv4/conf/*/rp_filter
do
enable $iter
done
fi
}

###############################################################################

enable_tcp_syn_cookies() {
if ( -e /proc/sys/net/ipv4/tcp_syncookies ); then
log “{ENABLE} tt SYN cookies protetion”
enable /proc/sys/net/ipv4/tcp_syncookies
fi
}

###############################################################################

drop_IANA_reserved_ips() {
iptables_bin=$1
log “{DROP} INCOMING: ttt all IANA reserved IPs”

$SUDO ${iptables_bin} -A INPUT -s 0.0.0.0/7 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 2.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 5.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 7.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 10.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 23.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 27.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 31.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 36.0.0.0/7 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 39.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 42.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 49.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 50.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 77.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 78.0.0.0/7 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 92.0.0.0/6 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 96.0.0.0/4 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 112.0.0.0/5 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 120.0.0.0/8 -j DROP
# $SUDO ${iptables_bin} -A INPUT -s 127.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 169.254.0.0/16 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 172.16.0.0/12 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 173.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 174.0.0.0/7 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 176.0.0.0/5 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 184.0.0.0/6 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 192.0.2.0/24 -j DROP
# $SUDO ${iptables_bin} -A INPUT -s 192.168.0.0/16 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 197.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 198.18.0.0/15 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 223.0.0.0/8 -j DROP
$SUDO ${iptables_bin} -A INPUT -s 224.0.0.0/3 -j DROP

}

###############################################################################

enable_log_martians() {
if ( -e /proc/sys/net/ipv4/conf/all/log_martians ); then
log “{ENABLE} tt log for all unroutable packets”
for iter in /proc/sys/net/ipv4/conf/*/log_martians
do
enable $iter
done
fi
}

###############################################################################

disable_enable_kernel_features() {
enable_broadcast_echo_protection
enable_log_martians
enable_source_address_verification
enable_tcp_syn_cookies

disable_icmp_redirects
disable_ip_forwarding
disable_source_routed_packets

}

###############################################################################

clear_all_rules() {
log “clear all rules”

iptables_bin=$1

# default table is filter
$SUDO ${iptables_bin} -F -t filter
$SUDO ${iptables_bin} -F -t nat
$SUDO ${iptables_bin} -F -t mangle

}

###############################################################################

default_drop_all() {
log “default drop”

iptables_bin=$1

# filter table
$SUDO ${iptables_bin} -t filter -P INPUT DROP
$SUDO ${iptables_bin} -t filter -P OUTPUT DROP
$SUDO ${iptables_bin} -t filter -P FORWARD DROP

# mangle table
$SUDO ${iptables_bin} -t mangle -P PREROUTING DROP
$SUDO ${iptables_bin} -t mangle -P INPUT DROP
$SUDO ${iptables_bin} -t mangle -P OUTPUT DROP
$SUDO ${iptables_bin} -t mangle -P FORWARD DROP
$SUDO ${iptables_bin} -t mangle -P POSTROUTING DROP

}

###############################################################################

log_all_dropped_incoming() {
log “t {LOG} INCOMING: tt all dropped”

iface=$1
iptables_bin=$2

# filter table
${SUDO} ${iptables_bin} -t filter -A INPUT -i ${iface} -m limit --limit 2/min -j LOG --log-prefix "{INPUT-filter-Dropped} " --log-level 7

# mangle table
${SUDO} ${iptables_bin} -t mangle -A INPUT -i ${iface} -m limit --limit 2/min -j LOG --log-prefix "{INPUT-mangle-Dropped} " --log-level 7

}

###############################################################################

log_all_dropped_outgoing() {
log “t {LOG} OUTGOING: tt all dropped”

iface=$1
iptables_bin=$2

# filter table
${SUDO} ${iptables_bin} -t filter -A OUTPUT -o ${iface} -m limit --limit 2/min -j LOG --log-prefix "{OUTPUT-filter-Dropped} " --log-level 7

# mangle table
${SUDO} ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -m limit --limit 2/min -j LOG --log-prefix "{OUTPUT-mangle-Dropped} " --log-level 7

}

###############################################################################

allow_related_established() {
log “{ALLOW} INCOMING & OUTGOING: t related & established packets”

iptables_bin=$1

# filter table
$SUDO ${iptables_bin} -t filter -I INPUT 1 -m state --state RELATED,ESTABLISHED -j ACCEPT
$SUDO ${iptables_bin} -t filter -I OUTPUT 1 -m state --state RELATED,ESTABLISHED -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -I PREROUTING 1 -m state --state RELATED,ESTABLISHED -j ACCEPT
$SUDO ${iptables_bin} -t mangle -I INPUT 1 -m state --state RELATED,ESTABLISHED -j ACCEPT
$SUDO ${iptables_bin} -t mangle -I OUTPUT 1 -m state --state RELATED,ESTABLISHED -j ACCEPT
$SUDO ${iptables_bin} -t mangle -I POSTROUTING 1 -m state --state RELATED,ESTABLISHED -j ACCEPT

}

###############################################################################

allow_loopback() {
log “{ALLOW} INCOMING & OUTGOING: t loopback interface”

iptables_bin=$1

# filter table
$SUDO ${iptables_bin} -t filter -A INPUT -i lo -j ACCEPT
$SUDO ${iptables_bin} -t filter -A OUTPUT -o lo -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A PREROUTING -i lo -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A INPUT -i lo -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o lo -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o lo -j ACCEPT

}

###############################################################################

allow_DHCP_out() {
log “t {ALLOW} OUTGOING: tt DHCP”

iface=$1
iptables_bin=$2

$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p udp --dport 67:68 --sport 67:68 -j ACCEPT

}

###############################################################################

allow_SSH_in() {
log “t {ALLOW} INCOMING: tt SSH”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A INPUT -i ${iface} -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A INPUT -o ${iface} -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A PREROUTING -o ${iface} -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT

}

###############################################################################

allow_SSH_out() {
log “t {ALLOW} OUTGOING: tt SSH”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o ${iface} -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT

}

###############################################################################

allow_WHOIS_out() {
log “t {ALLOW} OUTGOING: tt WHOIS”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p tcp -m tcp --dport 43 -m state --state NEW -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -p tcp -m tcp --dport 43 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o ${iface} -p tcp -m tcp --dport 43 -m state --state NEW -j ACCEPT

}

###############################################################################

allow_SMTP_out() {
log “t {ALLOW} OUTGOING: tt SMTP”

iface=$1
iptables_bin=$2

$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT

}

###############################################################################

allow_DNS_out() {
log “t {ALLOW} OUTGOING: tt DNS”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p udp -m udp --dport 53 -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -p udp -m udp --dport 53 -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o ${iface} -p udp -m udp --dport 53 -j ACCEPT

}

###############################################################################

allow_ping_in() {
log “{ALLOW} INCOMING: tt ping”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A INPUT -i ${iface} -p icmp --icmp-type echo-reply -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A PREROUTING -i ${iface} -p icmp --icmp-type echo-reply -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A INPUT -i ${iface} -p icmp --icmp-type echo-reply -j ACCEPT

}

###############################################################################

allow_ping_out() {
log “t {ALLOW} OUTGOING: tt ping”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p icmp --icmp-type echo-request -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -p icmp --icmp-type echo-request -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o ${iface} -p icmp --icmp-type echo-request -j ACCEPT

}

###############################################################################

allow_NTP_out() {
log “t {ALLOW} OUTGOING: tt NTP”

iface=$1
iptables_bin=$2

$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p udp --dport 123 --sport 123 -j ACCEPT

}

###############################################################################

allow_HTTP_out() {
log “t {ALLOW} OUTGOING: tt HTTP”

iface=$1
iptables_bin=$2

# filter table
$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p tcp --dport 80 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t filter -A OUTPUT -o ${iface} -p tcp --dport 443 -m state --state NEW -j ACCEPT

# mangle table
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -p tcp --dport 80 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A OUTPUT -o ${iface} -p tcp --dport 443 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o ${iface} -p tcp --dport 80 -m state --state NEW -j ACCEPT
$SUDO ${iptables_bin} -t mangle -A POSTROUTING -o ${iface} -p tcp --dport 443 -m state --state NEW -j ACCEPT

}

###############################################################################

allow_skype_in() {
log “t {ALLOW} INCOMING: tt skype”

iface=$1
iptables_bin=$2

$SUDO ${iptables_bin} -t filter -A INPUT -i ${iface} -p udp --dport 16514 -j ACCEPT
$SUDO ${iptables_bin} -t filter -A INPUT -i ${iface} -p tcp --dport 16514 -j ACCEPT

}

###############################################################################

firewall_all_ifaces() {
iptables_bin=$1

INET_FACES=`$IFCONFIG -s | $GREP -vi 'kernel' | $GREP -vi 'iface' | $GREP -v 'lo' | $AWK '{print $1}'`
for iface in $INET_FACES
do
    log "============== ${iface} =============="

    # allow incoming requests
    #allow_SSH_in ${iface}
    #allow_ping_in ${iface}
    allow_skype_in ${iface} ${iptables_bin}

    # allow outcoming requests
    allow_DHCP_out ${iface} ${iptables_bin}
    allow_DNS_out ${iface} ${iptables_bin}
    allow_HTTP_out ${iface} ${iptables_bin}
    allow_NTP_out ${iface} ${iptables_bin}
    allow_ping_out ${iface} ${iptables_bin}
    allow_SMTP_out ${iface} ${iptables_bin}
    allow_SSH_out ${iface} ${iptables_bin}
    allow_WHOIS_out ${iface} ${iptables_bin}

    # has to be the last rules to catch only the dropped packets
    log_all_dropped_incoming ${iface} ${iptables_bin}
    log_all_dropped_outgoing ${iface} ${iptables_bin}
done

}

###############################################################################

is_root() {
$LS $ROOT_DIR >/dev/null 2>/dev/null
return $?
}

###############################################################################

main() {
if ( “x$(is_root)” != “x0” ); then
log “Not a root!”
fi

log
log "-------------- KERNEL FEATURES ---------------"
disable_enable_kernel_features

# Handle IPv4 based firewall
if ( ! -z $IPv4TABLES ); then
    log
    log "-------------- IPv4 ---------------"
    clear_all_rules $IPv4TABLES
    default_drop_all $IPv4TABLES
    allow_related_established $IPv4TABLES
    allow_loopback $IPv4TABLES
    drop_IANA_reserved_ips $IPv4TABLES
    firewall_all_ifaces $IPv4TABLES
fi

# Handle IPv6 based firewall
if ( ! -z $IPv6TABLES ); then
    log
    log "-------------- IPv6 ---------------"
    clear_all_rules $IPv6TABLES
    default_drop_all $IPv6TABLES
fi

}

#set -x
main

networking – How to connect Raspberry Pi 4 to a hidden WiFi network on Ubuntu Server 20.04?

I have a Raspberry Py 4 with Ubuntu Server 20.04. I want to setup a WiFi connection on it. I have two WiFi networks (2.4 ghz and 5 ghz), both are hidden and have WPA2-Personal setup.

In my /etc/netpaln/50-cloud-init.yaml I have the following config:

network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    wifis:
        wlan0:
            optional: true
            access-points:
                "MY_HIDEN_SID":
                    password: "MY_PASSWORD"
            dhcp4: true

Unfortunately, network connection does not work. However, if I setup a mobile hotspot on my phone and change SID and password it connects successfully. So the reason must be in hidden network.

Question: How to connect Raspberry Pi 4 to a hidden WiFi network on Ubuntu Server 20.04?

UUbuntu 20.04, WiFi disconnected after few mints or when I start downloading WiFi stop working in seconds

I have dual boot on dell vostro 14 window 10 and ubantu 20 recently installed successfully and since then I get this problem whenever I want to download I had to do it in parts every few second it stop downloading and after restarting connection I have to continue download otherwise in 2 to 20 mints Windows it can stops working . I tried all methods online
Power save off
Drivers
Power save 3 to 2
Script to power off
Frequency change of connection but nothing worked please guide or help

networking – Just installed Ubuntu 20.04 – Not being able to connect to Wifi

just installed Ubuntu 20.04 on HP Pavillion dv6000 notebook.
After installation completed, tried to browse through firefox and seeing Im not connected.

Explored some relevant questions, and I do know Ubuntu can see my device as when going to terminal and typing command: lspci -vvnn | grep -A 9 Network
Getting the info. that it is Broadcomm
Here is exactly what I get:
02:00.0 Network controller (0280): Broadcom Inc. and subsidiaries BCM4311 802.11b/g WLAN (14e4:4311) (rev 02)
Subsystem: Hewlett-Packard Company BCM4311 802.11b/g Wireless LAN Controller (103c:1374)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f4000000 (64-bit, non-prefetchable) (size=16K)
Capabilities:
Kernel driver in use: b43-pci-bridge
Kernel modules: ssb

Not sure if I understand correctly but now I need to get a firmware install package and then driver both for Linux/Ubuntu for Broadcomm 4311 but this is where I go lost as when looking those, found some install package on https://launchpad.net/ubuntu/+source/b43-fwcutter but there were many options there and I was not sure if Im on the right path of maybe there is a much simpler way or Im not reading the issue correctly.

Help will be appreciated.