date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,400,384,865,000 |
Added support for detecting duplicate IPv4 addresses, with a timeout
configurable through the ipv4.dad-timeout connection property.
-- NEWS
dad-timeout / int32 / -1
Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activatio... |
These properties are generally part of the connection profile. However, some of these properties have a special value that indicates the "default" value. For those, the default value may be configured in NetworkManager.conf. Consequently, that's documented in man NetworkManager.conf -- as opposed to man nm-settings.
B... | Do the default settings of NetworkManager detect if there is a conflicting IPv4 address on the network? |
1,400,384,865,000 |
I have a fedora core machine, and it is picking up an IPV6 address, but not an IPV4 address. I have done dhclient -r eth0 but the ipv4 address has not come. I have reset the port using ifconfig, but the address keeps coming up as an IPV6 address.
|
It's possible that the lightning strike destroyed the network port on your machine, and that the IPv6 address is a self-assigned address. Have you tried using the 'ping6' command to try pinging an outside IP address via IPv6 to really ensure that you've got IPv6 connectivity to the outside world?
Also, I concur with ... | Fedora Core 4 won't get an IPV4 address |
1,400,384,865,000 |
After some research, I was wondering if it was possible to define a TTL by interface as I can the Hop Limit definition in ipv6.
To change the TTL in IPv4, I can change the file
/proc/sys/net/ipv4/ip_default_ttl
But this changes TTL for all interfaces.
However in IPv6, you can put a different hop limit value for eac... |
If that entry does not exist for ipv4, it's probably not supported.
But have you tried to modify TTL values with iptables? See if the TTL target helps
| Define specific TTL for each interfaces |
1,400,384,865,000 |
At my place I have a router that gives me an IPV4 address. My Gentoo PC works
fine but my Gentoo laptop stopped resolving names. I visited my parents and
tried connecting to their router, which gives me an IPV6 address, and presto,
everything was back to normal (I added the IPV6 equivalents of my nameservers
to /etc/r... |
iptables -L gives an incomplete view; in particular, it does not show the NAT nor mangle tables, which can and do influence how packets flow. For complete debugging these various tables will also need to be inspected
iptables -t nat -n -L
or the entire firewall ruleset dumped e.g. with
iptables-save
| Can not resolve names but can ping addresses when connected to IPV4 router, all works fine with IPV6 router |
1,400,384,865,000 |
I have IPv6 configured on my local network via radvd; it advertises a routable IPv6 block, that all the machines auto-configure.s
I have IPv4 assigned to a NAT'd block via dhcpd and that updates named.
My problem is that when I set the AAAA record for a host for it's IPv6 address (which doesn't change), named will th... |
I found an answer here http://www.gelato.unsw.edu.au/IA64wiki/IPv6DDNS
Essentially dhcpd has a way to add hooks for events, so on a IPv4 registration call a script that will generate the standard MAC based IPv6 address and register that.
UPDATE:
(I'm using ICH DHCP 4.1)
When using the "on commit" hook, it removes the ... | How to configure dhcpd to register ipv4 with bind while having static ipv6 addresses? |
1,495,372,992,000 |
I'm running debian 8 on my server. Recently, the server starting only using IPv6 for all outgoing TCP connections. It still accepts IPv4 for incoming connections, however.
Because of this, I can't access any web sites (port 80), make any ssh connections (port 22), nor access any other outgoing host via any TCP port fr... |
I take the "nuke it from orbit" approach when it comes to IPv6.
Add ipv6.disable=1 to your kernel options in /etc/default/grub then run update-grub and reboot:
GRUB_CMDLINE_LINUX_DEFAULT="... ipv6.disable=1"
Alternatively if you can't easily modify kernel parameters add this to your sysctl.conf or run sysctl to set m... | debian 8: My machine started to only use IPv6 for *outgoing* connections. How to go back to IPv4? |
1,495,372,992,000 |
My understanding is that
tcp6 is used for connections over IPv6 & tcp is used for connections over IPv4.
and
::ffff:127.0.0.1 is representing IPv6 address which is mapped to IPv4 address.
But when I use netstat to find open connections on a port like
netstat -anp | grep 31210
I get output as
tcp 0 0 ::ffff:127.0... |
TCP4 or TCP6 procotols don't exist. They can be used as a shorthand to indicate respectively TCP with IPv4 and TCP with IPv6, but that's an abuse of language -- the protocol used is always TCP.
Due to the separation of layers in the ISO/OSI model, the TCP segment (level 4) is always the same whether it's accompanying... | IPv6 over TCP or TCP6 |
1,495,372,992,000 |
I have Debian 4.19.194-1 as a router server with LAN, WAN, PPPOE (as gateway) and COMPUTER1 in LAN network which should have access to internet through Debian router.
As firewall I use nftables with rules:
#!/usr/sbin/nft -f
flush ruleset
define EXTIF = "ppp0"
define LANIF = "enp1s0"
define WANIF = "enp4s0"
define LO... |
The firewall rules did not cause the problem. Instead, it's due to the MTU difference in "plain" Ethernet and PPPoE. Since PPP header takes up (at least) 8 bytes, and the usual MTU of Ethernet itself is 1500 bytes, the MTU of PPPoE in that case will be at most 1492 bytes.
I don't know MTU stuff well enough to tell the... | Router with nftables doesn't work well |
1,495,372,992,000 |
A connection is a 5 tuple (ip src/dst, port src/dst, protocol).
What about different connections between ipv4 and ipv6?
If I define the iptables rule:
iptables -A INPUT -p tcp -m connlimit --connlimit-above 50 -j REJECT --reject-with tcp-reset
It limits the tcp connections to 50.
What about ipv6 tcp connections? ... |
You will have 50 of each connections, since iptables will handle only ipv4 and ip6tables will deal with ipv6 connections. They will not "sum" up, because they are managed by different tools on each protocol version.
Will nftables, the "new firewall" be able to deal with both protocols summing up everything? No. You wi... | iptables limit the number of connections in the system for both ipv4 ipv6 |
1,495,372,992,000 |
ss -lnp in server shows following information:
# ss -lnp
Recv-Q Send-Q Local Address:Port Peer Address:... |
1) This is how Linux works (by default) if you listen for connections on an ipv6 port.
https://utcc.utoronto.ca/~cks/space/blog/linux/Ipv6DualBinding
https://utcc.utoronto.ca/~cks/space/blog/programming/ModernIPv6Handling
2) The processes share the same "socket", which was created and "bound" to port 80.
In this cas... | According to socket statistics Apache listens only on IPv6, but actually serves IPv4 as well |
1,495,372,992,000 |
Does IPv6 have the 0-1024 superuser requirements for ports? I saw in the changelog for Linux 4.11 that they added a sysctl option to change it, but it only lists it under IPv4.
Also does Open/FreeBSD have that restriction in IPv6?
|
These ports are for TCP/UDP, which are protocols running on top of IP. So things should be same whatever version of IP you are using.
| IPv6 superuser ports |
1,495,372,992,000 |
I have a Debian Jessie 8 server with three unique IPv4 IPs. I connect to the server from Windows 7 via Putty. I can open three Putty windows using each of the three IPs. I am trying to execute a Perl script that checks whois information using Perl's use Net::Whois::Raw and the system's whois using backticks
$domain_in... |
According to
http://search.cpan.org/~nalobin/Net-Whois-Raw-2.85/lib/Net/Whois/Raw.pm, you can:
set_ips_for_server('whois.ripn.net', ['127.0.0.1']);
You can specify
IPs list which will be used for queries to desired whois server. It
can be useful if you have few interfaces, but you need to access whois
server from spe... | Execute Perl commands from a specific IP? |
1,495,372,992,000 |
I've connected two PCs running Linux Mint 20.2 with NetworkManager with Ethernet cable. On enabling the interface PCs obtained ip6 addresses and I'm able to ping one from another. But I'm getting annoying GUI notification "activation of network connection failed" and status of wired connection in NetworkManager applet... |
Read NetworkManager's log messages. They should tell you in more detail what is happening and what is failing on your network connection.
On systems using systemd-journald as a primary log mechanism (such as modern Ubuntu/Mint), you'll need a command like this:
journalctl -x -b _SYSTEMD_UNIT=NetworkManager.service
Th... | "Connecting...", "Connection failed. Activation of network connection failed" How to find out what does it mean exactly? (ping works) |
1,495,372,992,000 |
I have a use case where I want to forward certain IPv4 ports incoming into a machine, to to the same ports on another machine that uses IPv6.
I assume I can do this with [auto]ssh, but wonder if this is high performance, or if there is something else I could use? IPtables is one option, but I understand that this is I... |
You could use socat. It's a relay for bidirectional data transfers between two independent data channels. You can forward ipv4 to ipv6 and the other way around too.
Example for port 4000:
sudo socat TCP4-LISTEN:4000,fork TCP6:[xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:4000
| Highest performance way to route traffic from IPv4 to IPv6 on Linux? |
1,495,372,992,000 |
I have installed the Oracle VM VirtualBox in my laptop. Then I downloaded the Full ISO image for Oracle Linux 9.1 version (via https://yum.oracle.com/oracle-linux-isos.html) and used that in order to create an Oracle Linux (64 bit) virtual machine. The installation was successful and I was able to login to my VM.
I ca... |
According to the user manual IPv6 by default is disabled for guests using the NAT adapter.
You could try to change the guest network adapter to Bridged if you have IPv6 enabled on your LAN (network connections should be restarted in the guest or you could simply reboot it).
or
You could enable IPv6 using VBoxManage... | ping google.com within the Oracle Linux 9.1 VM is not working |
1,495,372,992,000 |
This page, linked from the avahi-autoipd man page says:
Most modern Linux distributions already include full IPv4 link-local support
However, if I look at the routing table on my Fedora 34 machine, I only see these three routes:
default via 10.180.64.1 dev wlo1 proto dhcp metric 600
10.180.64.0/22 dev wlo1 proto ke... |
Linux distributions stopped doing IPv4ALL by default.
network-manager: no longer falls back to link-local ipv4
Date: Wed, 11 Mar 2009 19:42:01 UTC
since the upgrade to 0.7, it seems that [NetworkManager] doesn't fall back to
link-local ipv4 in case dhcp times out, and instead goes into
'disconnected' state. ...
Re... | Is Fedora 34 configured for IPv4 link-local addresses? |
1,495,372,992,000 |
I'm trying to setup a raspberrypi 4 as a wifi access point. Following the official documentation I managed to bridge my eth0 interface and setup hostapd. The bridges IP is provided by an exisiting DHCP server on the network in contrast to the documentation.
The problem I'm facing is that none of the connected wifi dev... |
A.B's comment is actually right. My raspi and the current raspbian on it do load the br_netfilter module. Upon removing it and after restarting hostapd all my clients do now get valid IPv4 adresses. Inserting the module breaks the functionality again.
Thank you A.B!
| hostapd clients don't get ipv4 addresses |
1,495,372,992,000 |
There is some .pcap-file with fragmented IP traffic. I replay this file with tcpreplay, but also I need to replay it with DF (don't fragment) bit set in some packets.
I supposed that tcprewrite will help, but it seems that there is no ability to change IP-header flags in this utility.
So which utility (console prefera... |
There are various methods I would approach this.
If there aren't many packets, or it's a onetime change, I really like WireEdit, TraceWrangler is another GUI option.
Otherwise, two options if you have any programming experience, are Scapy(python), and PcapPlusPlus(C++). This PcapPlusPlus link might be enough of a tuto... | Setting 'DF'-bit in IP-header inside pcap file |
1,495,372,992,000 |
I tried to solve my problem that my touchpad is not running on my Lenovo 720-15IKB by installing the latest rc kernel 4.14.rc5 as described here, which really worked! The touchpad is working then! But now I have a new problem caused by that kernel:
Networking doesn't work correctly with kernel 4.14-rc5
I don't get an... |
Looking on google:
https://ubuntuforums.org/showthread.php?t=2372492
https://www.phoronix.com/scan.php?page=news_item&px=AppArmor-Linux-4.14
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1724450
It seems related to AppArmor, and I read there are patches (like perhaps editing apparmor's configuration: apparmo... | Get DHCP running with Kernel 4.14-rc5 |
1,495,372,992,000 |
I have a Linux-Board with two Ethernet-Interfaces (eth0, eth1).
On eth0 I have a IPv4 network, on eth1 there's a IPv6 network.
Now I want to route packets from specific devices on the IPv4-network to the IPv6-network and vice versa. Each IPv4-device has a unique IPv6-address and each IPv6-device has a unique IPv4-adre... |
If I understand your situation correctly I think the best solution for you would be to use SIIT-DC (SIIT-DC: Stateless IP/ICMP Translation for IPv6 Data Center Environments). It allows you to map an IPv4 address to an IPv6 address and vice versa.
The tool to do this with I personally like best is Jool. It is a Linux k... | Routing packets between IPv4 and IPv6 networks on different Interfaces |
1,495,372,992,000 |
So, one of my servers is behind NAT, and since there is already a publicly accessible apache server going on my LAN, I decided to access it from the outside with different ports, and remap them to the standard port of the apache on this new machine I want to get a cert on. I did that with classic port forwarding via m... |
It's not possible to use non-standard port, as conforming ACME server will still try to contact default 80 / 443 for http-01 / tls-sni-01 challenges.
E.g.certbot has a separate options for to listen to non-standard port, but that still doesn't help to pass the challenge:
certonly:
Options for modifying h... | Changing the port letsencrypt tries to connect on |
1,495,372,992,000 |
Is there a tool that we can convert a list of IP into a fixed network CIDR form with x.x.x.0/24 and x.x.0.0/16? For example, to demonstrate this, I have list of IPs that possibly can be converted to these fixed form like below:
First if I want to convert list of IP below to possible CIDR 24 but with fixed form of x.x.... |
I don't know one, so I wrote one (in perl). I also figured your tool design was incomplete.
It should only give CIDR blocks of the requested levels, even when there is only one address therein.
It should also work without a target level.
Thus:
$ cat sample
1.22.3.4
1.28.3.5
1.211.3.7
1.211.3.2
1.211.3.1
$ list2ci... | Convert list of IP into fixed CIDR form |
1,495,372,992,000 |
I don't have support for IPv6 on my system, and I am only using IPv4. My wpa_supplicant logs are flooded with following error messages:
wpa_supplicant[3370]: nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
wpa_supplicant[3370]: nl80211: Failed to set IPv6... |
As I mentioned in your other post, disabling IPv6 support is not possible in wpa_supplicant. If your only goal is to stop wpa_supplicant from logging the two errors mentioned in your question, just clone the source code and modify this function by commenting out the lines that set IPv6 params.
// comment out these lin... | wpa_supplicant: disable IPv6 |
1,495,372,992,000 |
All of the articles I read that explains why there are 13 root dns servers saying each ip address takes 32 bytes and hence (13 x 32) = 416 bytes leaving up to 96 bytes for other protocol information. For example, see below
"At the time the DNS was designed, the IP address in use was IPv4, which contains 32 bits. For... |
"... As each IPv4 address requires 32 bytes, having 13 servers uses 416 bytes, leaving up to 96 bytes for the remaining protocol information."
The DNS protocol never transmits just plain IP addresses, but properly formatted queries and answers composed of DNS resource records.
The "IPv4 address requires 32 bytes" pr... | Ip address is of 32 bit, which means 4 bytes. Yet all answers to question on 13 root dns servers say otherwise [closed] |
1,495,372,992,000 |
My scenario
Relevant entries in my /etc/hosts (I have them written in the same order you see them here)
172.22.5.107 www.wordpress-rend-adri.com
192.168.1.116 www.wordpress-rend-adri.com
I use my laptop in my house and school, hence I'm always dealing with 2 address spaces:
192.168.1.0/24
172.22.0.0/16
So I ha... |
I have done a few tests on my debian/wsl
~$ uname -a
Linux DESKTOP-OMM8LBC 4.4.0-17763-Microsoft #864-Microsoft Thu Nov 07 15:22:00 PST 2019 x86_64 GNU/Linux
# /etc/hosts
172.22.5.107 www.wordpress-rend-adri.com # Unreachable IP from my LAN
216.58.198.164 www.wordpress-rend-adri.com # IP for www.google.com
192.168.... | Different IP:hostName mappings for same host in `/etc/hosts`. Why does this work? |
1,495,372,992,000 |
I'm trying to add one main IP, two extra IP and one IP6. Here is my interfaces file located at /etc/network/interfaces:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
allow-hotplug ens192
iface ens192 inet static
address 23.227.198.250/26
gateway 23.227.198.194
dns-nameserver... |
There is only one default gateway: the default gateway used in the default route, which is what gateway controls. The second time the network configuration tools attempt to add a default route with the same metric etc. this triggers an RTNETLINK answers: File exists error.
Just keep the first instance of:
gat... | raise network interfaces - debian 12 |
1,495,372,992,000 |
I am trying to ssh into an embedded Linux device (let's call it petalinux) connected to my Ubuntu server running 22.04 (let's call it oip). petalinux and oip are connected by a direct ethernet cable and a serial UART. I am able to connect to the device using a serial terminal (minicom), but ssh times out. I am also un... |
With 192.168.0.10/24 already set on petalinux's eth0 linked to oip's eno1, to allow communication between oip and petalinux, run this on oip (as root user, meaning it probably should be prepended by sudo ):
ip addr add 192.168.0.11/24 dev eno1
And that's it: each should now be able to reach the other using the other'... | Unable to ping or ssh into embedded Linux device: eno1 has no IPv4 address |
1,495,372,992,000 |
My linux box has 3 IP4 addresses and a range of IP6 addresses.
Supposing I wish to make a curl fetch, how to stipulate from which address the request emanates?
Note: I'm actually using Python/PyCurl, however I'm interested in both bash+curl and curl-only solutions. If curl-only I can implement with PyCurl. If bash+cur... |
Do you mean the --interface option? From man curl:
--interface
Perform an operation using a specified interface. You can
enter interface name, IP address or host name. An example
could look like:
curl --interface eth0:1 https://www.example.com/
If this option is used several times, the last one will be used.
Note ... | Specify which of my machine's IP4 or IP6 addresses is to be used for a curl request |
1,495,372,992,000 |
The official Debian networking documentation tells to use:
ifup 6to4
But ifup is not found (ifupdown and ifupdown2 are commands not found too, even after having been installed). Does it have something to do with prefix delegation? If so, do I have to configure it?
And the linux documentation project (i.e. tldp.org) s... |
Maybe some basics first:
A IPv6 address of a host/interface always consists of 128bit which include the prefix (first 64bit) and the interface identification [IID] (last 64bit). Therefor the CIDR notation for a host/interface address is always /64.
The scope of an IPv6 host/interface address is one of the following:
L... | How to add an IPv6 address? |
1,495,372,992,000 |
It used to be that you could force command line FTP to use IPv4 like so:
ftp -4 ftp.example.com
However, at some point in the relatively recent past the "-4" (and for that matter, the "-6") option seems to have been removed. Despite exhaustively searching the Web (even for the exact error "ftp: 4: unknown option") I c... |
-4 and -6 are options added by a patch in the Debian version of netkit-ftp; you’ll find these available in any Debian derivative. Fedora, RHEL and CentOS don’t have an equivalent patch, so their ftp doesn’t support these options.
To force IPv4, you could try specifying the target IP address rather than the host name.
| What happened to the "-4" option for command line FTP? |
1,495,372,992,000 |
I am using Red Hat Enterprise 6 and I'm trying to search through the /etc/ directory for files that contain any IPv4 address.
|
Sure:
grep -lrE '([0-9]{1,3}\.){3}[0-9]{1,3}' /etc
-l means list only matching files
-r is recursive
-E is extended regex
Regex taken from https://unix.stackexchange.com/a/296597/243015
| How do I use grep to output only the names of files that contain any ipv4 address |
1,363,937,239,000 |
Linux systems have been having a historical (>5 yrs) problem in configuring audio devices especially commonplace headphones with combo jacks.
Since many people want to use their favorite linux systems for video chatting, there are records of frustrating unresolved problems all across various forums.
I get that the dri... |
After many trials and tests I found that this issue can be solved through hardware rather than software. Using a 'USB Headphone/Microphone Splitter', I was able to force internal mic for input and headphones for output.
Output need to be set to 'USB Audio Device'.
Input would be default built-in internal speakers. J... | Headphones with combo jack: Force internal mic for input and headphones for output |
1,363,937,239,000 |
Every time time I connect headphones to the 3.5mm audio jack on my Dell XPS 13, I hear continuous white noise in addition to the audio I expect to hear. It's much louder than the typical noise floor for a headphone jack.
I've found many other reports of this same problem for both the XPS 13 9350 (1, 2) and the XPS 13 ... |
Set Headphone Mic Boost gain to 10dB. Any other value seems to cause the irritating background noise in headphones. This can be done with amixer:
amixer -c0 sset 'Headphone Mic Boost' 10dB
To make this happen automatically every time you headphones are connected install acpid.
Start it by running:
sudo systemctl start... | How to prevent white noise in headphones on Dell XPS 13 9350/9360 |
1,363,937,239,000 |
After I use Jack, the PulseAudio outputs and inputs are replaced by a dummy device. I've tried to kill PulseAudio and reload Alsa, but the only way I can use an Alsa-based application again is to reboot. I know that there must be a way to fix the problem without rebooting. I have had this problem in multiple Linux dis... |
The solution turned out to be simpler than it appeared. The output of fuser -v /dev/snd/* revealed jackd was silently hogging the audio card even after QjackCtl supposedly killed it. Running killall jackd fixed the problem. The problem wasn't with PulseAudio, but rather jackd running invisibly in the background.
| How to restart Alsa/PulseAudio after using Jack |
1,363,937,239,000 |
I am trying to set up Jack, as I've heard it's the Linux equivalent to ASIO on Windows. I play guitar for fun and thought it would be cool to play with Ardour or find a FOSS equivalent to Guitar Rig.
However I do not understand... well, anything. I don't understand what Jack does. From what I can gather, the general ... |
In my endeavor with Linux sound I have ended up disabling autospawning of Pulse Audio (so it doesn't restart when shut down):
Add autospawn=no to ~/.pulse/client.conf.
Stop with pactl exit
Start with pulseaudio
Doing live sound stuff or the like I shut down PA and run JACK only. No PA bridge. I have never gotten la... | How do I use Jack? How does Linux sound work? [closed] |
1,363,937,239,000 |
Linux newbie: How do I use Jack? How does Linux sound work?
I have an app that is trying to output sound through ALSA or JACK, but I am not hearing anything.
Here are a couple of articles, from which I learned that ALSA is the kernel-mode sound driver for linux, and libasound is the user-space library to which applic... |
I can understand your confusion, i've been there :)
Lets start with the fact that PulseAudio, like JACK are sound servers in a sense, with different aims in mind though. JACK is aimed at the professional audio user/musician, while PA aims at providing ease of use.
The audio route is a little different than what you h... | Linux sound: how does it work and why do I need to chain 3 architectures to use JACK? |
1,363,937,239,000 |
How do I print and connect jack-audio and midi ports from the command line, similar to aconnect -io or aconnect 20:0 132:1 for inputs and outputs of ALSA MIDI?
|
jack_lsp [options] [filter string]
is able to print all jack ports (Audio and MIDI).
From the help-text:
List active Jack ports, and optionally display extra information.
Optionally filter ports which match ALL strings provided after any options.
Display options:
-s, --server <name> Connect to the jack serv... | Print and connect Jack Audio and MIDI ports from the command line |
1,363,937,239,000 |
I am a bit confused about audio device names. If I use command aplay -l I get the list of all audio devices on my system:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device... |
Each card has a number (also called "index").
Typically, a driver grabs the first free number, but it's possible to force drivers to use another number. It's also possible for numbers to remain free because they were used previously by an unplugged device.
Each card has name (such as "HDA NVidia"), and a unique ID (su... | Alsa & JACK - card and device names (different naming conventions) |
1,363,937,239,000 |
I need a simple way to connect the midi keyboard to pulse audio and leave it active. ( i'm not worried about low latency.)
So far, I've looked at Ted's Linux MIDI Guide and followed all of that, but I reverted to normal latency kernel, when the low-latency caused trouble with my input devices. Following Ted's instruc... |
For beginners who don't need to fuss with studio-grade settings...
executable file pulsepiano, adapted from Ted's Linux Midi Guide to use Pulse instead of Jack.
So far I only can't get the script to hook up the MIDI-out from the keyboard, but that might be another topic.
You have to install fluidsynth, vmpk, and get ... | Simple way to connect midi keyboard to pulseaudio without using Jack |
1,363,937,239,000 |
Audacity has a very nice noise cancellation filter. Is it possible, using JACK with ALSA, to pipe live audio through Audacity's noise cancellation filter?
|
No, for real time processing you would want to use Ardour
| Live noise cancellation of microphone audio with JACK, ALSA, Audacity? |
1,363,937,239,000 |
What is the difference between softwares like JACK, PulseAudio, ALSA, etc?
And how does these relate to audio server and audio device driver in a linux system?
|
Very briefly:
ALSA contains the actual device drivers (in the kernel source), and a library to access those drivers. You use sound perfectly fine with just ALSA alone.
PulseAudio implements an additional audio routing level on top of ALSA, including volumes and conversions. Most distros use the PulseAudio + ALSA combo... | Pulse Audio vs ALSA vs audio server vs audio device driver |
1,363,937,239,000 |
I've installed jack2 as a substitution for jack from official repositories (I'm on Arch Linux):
# pacman -S jack2
I need to use jack2 because it provides jackd (it's needed for another application), while jack2_dbus does not provide it.
According to this manual, in order to configure such parameters as sampling rate,... |
You only choose audio card once when starting jackd. You can list cards available to alsa with aplay -l (aplay is part of alsa-utils). Then you can start the jack daemon, and pick the card to use with jackd -d alsa -d hw:<card>,<device>.
| How to configure which sound card jack2 will use |
1,363,937,239,000 |
I am running espeak on Linux Mint 14.
Whenever I try to run it, it shows following warnings ( Not errors as it works correctly ).
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdat... |
My espeak also returns similar messages:
$ espeak -v en-us+3 -s 120 -k 20 "Pray. For. Moe. Jo."
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA... | Espeak showing some warnings and Input output error |
1,363,937,239,000 |
I'm trying to play with ardour. When I started it up, it complained that jackd isn't running, so I ran jackd -d alsa, which displayed:
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute... |
A snippet from the Debian-specific README file for ardour (located at "/usr/share/doc/ardour/README.Debian"):
You have to run jackd and ardour as the same user.
That is, I assumed I was supposed to start jackd as root.
| Issues with ardour and jackd |
1,363,937,239,000 |
I am using jackd and pulseaudio with the pulseaudio-jack-module so that I can have pulseaudio and jack running at the same time. I mostly use jack applications, except for web browsing and a few other applications.
I am trying to record audio but I get really bad feedback if I try to record audio. If I plug in my head... |
It does look like you're boosting your mic gain; that does make noise more pronounced.
Also, you probably have too many mics active. You should methodically go through each capture option and mute it, and then unmute one-by-one until you identify the one you actually are using.
| linux audio feedback |
1,363,937,239,000 |
There is not sound anymore in my headphones (jack connection) even though it used to work.
During my last session, I did quite a lot of tweaks on my
installation, so far, here is what I could retrieve:
sudo apt install qt5ct qt4-qtconfig libqt5svg5 kvantum
Updates with the update manager (including upgrading to Lin... |
I've been given the answer on the LinuxMint forum:
Add to manually reload Alsa sudo alsa force-reload
It sounds like a strange solution as I would assume that rebooting would reload modules anyway. But it didn't apparently, and this solution fixed the issue durably.
| No sound with headphones in Linuxmint 19.1 |
1,363,937,239,000 |
In the shell, when I pipe jack_cpu_load through sed, or cut, no matter what options I use it stops printing just before the lines I want to see.
jack_cpu_load | sed -n 8p will print:
Jack: JackClient::kActivateClient name = jack_cpu_load ref = 4
The very next line should read something like jack DSP load 0.294772 whi... |
Maybe the output doesn't all go to stdout. Try jack_cpu_load 2>&1 | sed -n 8p
Or it is a buffering issue. Try stdbuf -i0 -o0 -e0 jack_cpu_load | sed -n 9p
| Pipe output of jack_cpu_load through sed |
1,363,937,239,000 |
I have the Jack Audio Connection Kit (JACK) installed, but cannot seem to get jack_control start to start the service.
I'm using Slackware64-current, which recently updated its /etc/dbus-1/system.conf to have a more restrictive configuration:
<!-- ... -->
<policy context="default">
<!-- All users can connect to syst... |
I figured this out a while ago. Turns out it was a CAS-ARMv7 patch to JACK that broke DBUS functionality and I managed to fix using this patch. The issues were resolved some time ago in the JACK subversion repository and it works fine now.
| Configuring DBUS to start JACK |
1,363,937,239,000 |
I'm currently trying to script the headphone plug-in/out event. I found out that I can script this quite easily as an acpi event..
I created a file in /etc/acpi/events/ with the event event=jack[ /]headphone, which then just calls my script.
I've also determined the file and exact line, which holds information about w... |
I found out that the problem can be easily circumvented, by checking for the specific plug/unplug event on the jack. The solution below will give the script the information about the specific jack events, which will mute sound, when the jack is unplugged.
/etc/acpi/events/jack:
event=jack[ /]headphone
action=/etc/acpi... | Possible race condition when scripting headphone plug-in event |
1,363,937,239,000 |
The only command line solution for gapless playback I found so far (working with ALSA and JACK) is moc (»music on console«). While I'm still searching for a simpler way I was wondering if it is possible to loop an audio file into a new file for a given number of times?
Something like:
loop-audio infile.flac --loop 32 ... |
Sometimes it is just good to know that linux-life can be as easy as imagined, in this case by using SoX (Sound eXchange):
sox infile.flac outfile.flac repeat 32
this even works with different file formats like:
sox infile.flac outfile.mp3 repeat 32
would loop into a 128 kbps MP3
other bit rates can be set using the ... | Loop audio file from the command line (gapless) or into new file |
1,363,937,239,000 |
I made the stupid mistake to install jack2 while using pulseaudio. The audio wasn't working at all (and I realized I didn't need Jack) so I decided to remove jack2. Now I do have sound (with the laptop's built in speakers), but pavucontrol is not loading (frozen at Establishing connection with pulseaudio. Please wait.... |
I managed to solve it removing all local config files from ~/.config/pulse and ~/.pulse
Now it works perfectly
| Remove everything jack related |
1,363,937,239,000 |
Even with the realtime kernel, following the steps here: https://jackaudio.org/faq/linux_rt_config.html and setting jack to realtime (QJackCtl -> Settings -> Parameters -> Realtime, or using the jackd -R command line arg), I was getting a ton of XRUNs (visible in QJackCtl as the red number, or in the Messages dialog),... |
It works when I increase the Sample Rate. I have it at 88200 set now and it works really good without XRUNs and stuttering.
You can do that in QJackCtl in Setup... -> Settings -> Parameters
| Lots of XRUNs in Jack |
1,363,937,239,000 |
I have two computers and they have pretty similar manjaro installations. Both have the same jack2, QJackCtl and kernel versions installed.
Computer 1
This is the one that works:
I can start jack and hear stuff in lmms and Hydrogen. Other audio output from pulseaudio will then stop which is expected afaik. When stoppi... |
The solution for no audio playing at all was to check the output devices in QJackCtl
Setup... -> Settings -> Advanced -> Output Device
and setting it to my soundcard.
| jack is not playing audio, pulseaudio keeps being active |
1,363,937,239,000 |
I have failed to pipe the recorded audio input on my audio device (an alsa driven hifiberry with an adc hosted on a raspberry pi) despite trying my best to pipe the output into tee after arecord, install and set up pulseaudio and utilize parec, as well as jackd and jack_capture.
Critical diagram of my mission:
Line le... |
Please try something like
pacmd load-module module-loopback source="alsa_input.platform-soc_sound.stereo-fallback" sink="alsa_output.whatever"
where "alsa_output.whatever" is the actual name of the line-out sink. You can see the sinks with
pacmd list-sinks | grep name:
I thought "loopback" is a term relegated to ca... | What is the ideal way to play-through or monitor audio input using arecord, parec or jackd? |
1,618,762,703,000 |
There are several guides of how to use JACK with ALSA dmix plugin, like this and this. All of them suggest to route the JACK output through dmix, which causes a latency to the jackified programs. To avoid it, I've decided to plug dmix into JACK instead. I tried the following .asoundrc:
pcm.!default {
type plug
... |
The dmix plugin works only with a hw plugin as slave.
If you want to mix the output of Jack and other programs, use Jack on top of dmix, or consider using PulseAudio.
| Plug dmix into JACK |
1,618,762,703,000 |
I built and compiled amSynth 1.5.1 from source. I then started qjackctl and ran amsynth from command line, but it produced the following error.
JACK init failed:
error: could not open ALSA MIDI interface
However, I had amSynth 1.3.2 (the one in the Mint 17 repositories) running perfectly fine.
What caused this/how ... |
Discovery: the reason this happened is because I did not configure amsynth to be built with JACK and ALSA support when compiling.
Look at the output of running ./configure:
| Build with ALSA support............................... : no
| Build with JACK support............................... : no
Two steps to fix:
Ma... | AmSynth 1.5.1 with jack and alsa (JACK init failed: error: could not open ALSA MIDI interface) |
1,618,762,703,000 |
Sound newbie here.
I'm trying to configure listener but get A LOT of errors.
My goal is to record sound using that tool from external usb mic which is in webcam.
So, I have headless (no X running) Raspberry Pi model B+ running Raspbian 10, there's no realtime priority because I was unable to set it up on this OS and t... |
Partial answer:
I've never used listener, and your link doesn't seem to include a man page. But it says there's an ALSA version of listener.
So since you are running headless anyway: Remove PulseAudio, remove JACK, remove DBUS (unless you need that for something else). Download the ALSA version of listener, point it d... | setlistener: errors with jack and alsa |
1,618,762,703,000 |
After an upgrade to debian wheezy (I did not upgrade the kernel - it is still 3.8.2) I can no longer start jackd in the way I used to do it. I get you are not allowed to use realtime scheduling.
My investigation show, that this is related to a sudo command in my script, where I sudo from root to martin. The sudo is r... |
I would imagine that sudo is preserving your environment of the root user, and therefore may not have paths or other environment variables that the martin user has set. It may be also that you need to run jack via sudo from a shell with the -s /path/to/shell option.
However as root, you have the rights to su (substit... | Losing (realtime) permission when sudoing from root to myself |
1,618,762,703,000 |
I see that with audio servers (in my case, pipewire) you can alter the "latency". (please forgive me, I am not very knowledgeable with these things.)
PIPEWIRE_LATENCY="128/48000"
The Arch Linux wiki described this as "request[ing] a custom buffer size".
I was wondering, is there a "downside" to setting the latency rea... |
When the buffer is small, It fills up more quickly and empties out more quickly. This is why the latency shrinks.
However, the processes that put data into the buffer and take data out of the buffer will be triggered more often. So you may see higher consumption of your computer's CPU by the audio software when you ... | Downside of decreasing audio latency |
1,618,762,703,000 |
To test and resolve this problem I am using a fresh install of Fedora 33, audio settings or configuration files left untouched.
By default the audio is heavily distorted (it is possible to make out what is being played, but overall it is not usable).
However when I install and start jackd and leave it running with the... |
I see, I tried converting the file myself using sox. What I got then was the following error: Playing WAVE 'CONVERTED-test.wav' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo aplay: set_params:1349: Channels count non available. Using channels 18 with the sox command then finally makes aplay play the file prope... | Audio distorted on pulse/alsa, works fine on JACK. How to analyze why JACK works correctly and use that knowledge to fix pulse/alsa configuration? |
1,618,762,703,000 |
Attempting to write some small midi programs with rtmidi on my Raspberry PI (Debian Wheezy). But, when I compile it, g++ cannot find jack/jack.h.
However, when I run sudo apt-get install jackd it says I have everything up to date. I'm missing something...
|
/usr/include/jack/jack.h is provided by libjack-dev (jackd1) or libjack-jackd2-dev (jackd2) package. You need to install either of them.
Debian has the service where you can search for packages which contain specific files. Here's the result for jack/jack.h.
| Jack and Raspberry Pi |
1,618,762,703,000 |
Debian Buster. I use Pulseaudio as sound server but sometimes launch Jack for MAO.
When Jack is on, I can get the sound of Pulseaudio applications thanks to the pulseaudio-module-jack that adds a Pulseaudio sink to Jack (as I explained in https://askubuntu.com/a/1213554/419514).
Except I came to realize that not all a... |
I had to open pavucontrol and set "Jack sink" as output for each application. Once this is set, it gets back to my soundcard when I stop jackd and it is automatically set back to "Jack sink" when I start it again.
| Pulse audio + Jack : some pulse audio apps work some don't |
1,398,727,302,000 |
Are there any notable differences between LXC (Linux containers) and FreeBSD's jails in terms of security, stability & performance?
On first look, both approaches look very similar.
|
No matter the fancy name used here, both are solutions to a specific problem: A better segregation solution than classic Unix chroot. Operating system-level virtualization, containers, zones, or even "chroot with steroids" are names or commercial titles that define the same concept of userspace separation, but with di... | Linux LXC vs FreeBSD jail |
1,398,727,302,000 |
Were I root, I could simply create a dummy user/group, set file permissions accordingly and execute the process as that user. However I am not, so is there any way to achieve this without being root?
|
More similar Qs with more answers worth attention:
https://stackoverflow.com/q/3859710/94687
https://stackoverflow.com/q/4410447/94687
https://stackoverflow.com/q/4249063/94687
https://stackoverflow.com/q/1019707/94687
NOTE: Some of the answers there point to specific solutions not yet mentioned here.
Actually, th... | How to "jail" a process without being root? |
1,398,727,302,000 |
In FreeBSD 4.9 it was very easy to accomplish with just a single command like
jail [-u username] path hostname ip-number command
if path was / you had running just the same program as usual but all its network communication was restricted to use only given IP-address as the source. Sometimes it's very handy.
Now in ... |
Starting the process inside a network namespace that can only see the desired IP address can accomplish something similar. For instance, supposed I only wanted localhost available to a particular program.
First, I create the network namespace:
ip netns add limitednet
Namespaces have a loopback interface by default, ... | Linux: Is there handy way to exec a program binding it to IP-address of choice? |
1,398,727,302,000 |
I have a FreeBSD jail in which I run a server using the command:
/usr/sbin/daemon /path/to/script.py
At the moment I have to run this command every time I restart the machine and the jail starts. I'd like to have this command started from /etc/rc. Is there an easy way to create a FreeBSD rc script for a daemon comman... |
command should not contain multiple words. This is the cause of the [ error you see. You should set any flags separately.
Also, you should use pytivo_user to set the running uid, and not daemon -u. See the rc.subr(8) man page for all these magic variables.
Also, you should let the rc subsystem know that pytivo is a Py... | Is there an easy way to create a FreeBSD rc script? |
1,398,727,302,000 |
I've installed jailkit on Ubuntu 12.04 and I have set up a user's shell to /bin/bash - but when it is invoked it runs /etc/bash.bashrc instead of /etc/profile
If you haven't used jailkit before here's the gist of it:
A "jailed" version of the system root is created somewhere, like /home/jail
Jailed users home directo... |
Normally bash knows that it's a login shell because when the login program invokes it, it tells bash that its name is -bash. That name is in argv[0], the zeroth command line argument, which is conventionally the way the user invoked the program. The initial hyphen is a convention to tell a shell that it's a login shel... | How does bash know how it is being invoked? |
1,398,727,302,000 |
The goal is to install and run programs in a displaced (relocated) distro (whose / must not coincide with the global /) inside a host Linux system. The programs are not adapted for using a different / .
fakechroot is not a complete solution because it employs library-substitution instead of acting on the level of syst... |
The solution must probably be based either on ptrace or namespaces (unshare).
ptrace-based solutions are probably less efficient then namespaces/unshare-based (but the latter technology is cutting-edge and is not well explored path, probably).
ptrace-based
UMView
As for ptrced-based solutions, thanks to the comments a... | How to achieve the effect of chroot in userspace in Linux (without being root)? |
1,398,727,302,000 |
Is it possible to use LXC on a desktop system to confine browsers and other pieces of software that have in the past been shown to be prone to certain kinds of exploits. So what I want to achieve is to jail, say Firefox, be still able to view its windows etc and yet be sure it only has read and write access to anythin... |
Firejail is a Linux namespaces sandbox program that can jail Firefox or any other GUI software. It should work on any Linux computer.
| Can LXC be used to jail instances of an installed browser? |
1,398,727,302,000 |
I have a question about giving a shell account to somebody. How safe is it? He could read /etc. How can I give a secured shell account that will only restrict the user to some bins and his own home? Is the only way a chroot jail?
|
One of the most easy/efficient way to control what a user can do is lshell.
lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and mo... | How can I safely give a shell to somebody? |
1,398,727,302,000 |
I run Fedora with GNOME and recently installed Viber for linux. It's very good and all is working just fine.
As Viber is not open-source software, I decided to run it as another user to make sure that it doesn't have access to my files without my concent, by creating a user:group viber:viber. If I try to open from ins... |
I wasn't aware of Pulseaudio running on Fedora as audio server.
After researching, I have finally found a way to share audio (microphone and speakers) among other users, while running Pulseaudio as normal user (myself) and not in System Mode.
In order to do that you will only need to copy initial configuration file to... | Running Viber as another user while using "mine" X Server's microphine and speakers |
1,398,727,302,000 |
If you have a web-server (e.g. nginx) often you use a fast-cgi server or another application-http-server for dynamic content. That means in both cases you have a nice process separation between the web-server process and the fast-cgi (or application-http-server process - in the following called slave).
The web-server... |
Under Ubuntu, another way of jailing is apparmor!
It is a path based mandatory access control (MAC) Linux Security Module (LSM). In Ubuntu 10.04 it is enabled by default for selected services.
The documentation is quite fragmented. The Ubuntu documentation could be ... better. Even the upstream documentation does not ... | How to jail a fastcgi server (or a web-proxied server)? |
1,398,727,302,000 |
I am trying to set up a ssh-chroot jail on one of my NAS servers. The system runs on NAS4Free (which is based on nanobsd). The user should be able to run only one command, which is a bash-script that opens ssh to another server and executes one command there.
To setup the chroot I have this in my sshd config.
Match Us... |
I created dev/null using mknod dev/null c 2 2
Your knowledge is outdated. Things do not work this way any more, now that NAS4Free is based on the likes of FreeBSD 10 and 11. (Nor are those the device numbers for the null device anyway.) Read the mknod manual. You can still run mknod to create device nodes in an ... | ssh in chrooted jail doesn't work because of /dev/null operation not supported |
1,398,727,302,000 |
Is there a common way of distinguishing between the messages of multiple processes in syslog-ng beside setting different facilities?
+1 if filtering and therefore logging in different files would be possible.
I have a system setup with two running sshd instances. One is running in a chrooted environment. Since syslog ... |
Change the name of the executable (note that that also affects PAM configuration).
ln /path/to/sshd /path/to/sshd-whatever
Start as /path/to/sshd-whatever. And define PAM configuration in /etc/pam.d/sshd-whatever. Log entries will show as sshd-whatever instead of sshd.
| Separate messages of multiple sshds in syslog-ng |
1,398,727,302,000 |
After calling make installworld (or make world), there are two ways of updating source files in the new world: calling mergemaster -p or make distribution. I know that mergemaster calls make distribution but what else does it do and why would I call it instead of just make distribution?
|
make distribution just installs new configuration files, while mergemaster walks interactively over all config files and asks you which ones you want (and intelligently upgrades files you never edited in the first place if possible). It even gives you the option to merge them as needed. Basically, it automates the pro... | What does 'mergemaster' do that 'make distribution' doesn't? |
1,398,727,302,000 |
Let's assume I have a casual user who can log in to the system via SSH into a bash shell. I also have a PHP (though the language is irrelevant here) script that acts as a process accepting various commands and other user input and acts according to them (essentially a 'shell-like' script).
Now, what I want to do is to... |
Following the updated information, you should have them do private/public key pairs and inside the .ssh/authorized_keys file set it to only run script.php file. You shouldn't rely on the .bashrc for protection, especially since that is needed to initialize the environment.
| "Virtual" shell, ie. jailing an user inside a process after the (SSH) login |
1,398,727,302,000 |
Strangely enough, it appears that Squid cannot start if the squid user is not affected to the UID 100. When trying to use another PID, the service systematically fails to start with the following error:
2016/03/10 10:53:13| storeDirWriteCleanLogs: Starting...
2016/03/10 10:53:13| Finished. Wrote 0 entries.
2016/03/... |
OK, I got it now. After a few check on the FreeBSD forum, I can now confirm that FreeBSD jails act a bit like some Swiss cheese as long as SHM objects are concerned. Indeed, FreeBSD does not provide any isolation at all for SHM objects: all jails can access all SHM objects, system-wide, with no way to prevent it.
The ... | How to change Squid service UID in FreeBSD? |
1,398,727,302,000 |
I'm using FreeBSD 11.2 at the moment (likely to move to 12 in a while). I need a tiny authoritative-only DNS server (no lookup or caching needed, under 10 domains and under 10 queries/hr, almost no record changes).
I'm likely to go with TinyDNS, part of djbdns, which is well reputed for security and also seems mini... |
This is rather lenghty so the very short version for those who cannot be bothered to read it all:
echo "testjail { }" >> /etc/jail.conf
mkdir -p /usr/local/jails/testjail
bsdinstall jail /usr/local/jails/testjail
service jail start testjail
pkg -j testjail install -y nginx
sysrc -j testjail "nginx_enable"=YES
service... | First time installing TinyDNS as a service in a FreeBSD jail - how to do it? |
1,398,727,302,000 |
I'm running FreeBSD 10.3 p4 and observed some strange behavior
When restarting the machine pf starts due to /etc/rc.conf entry
# JAILS
cloned_interfaces="${cloned_interfaces} lo1"
gateway_enable="YES"
ipv6_gateway_enable="YES"
# OPENVPN -> jails
cloned_interfaces="${cloned_interfaces} tun0"
# FIREWALL
pf_enable="YES... |
The problem here is that /etc/rc.d/pf runs before /usr/local/etc/rc.d/ezjail, so the kernel hasn't configured the jailed network by the time it tries to load the firewall rules. You might be tempted to alter the pf script to start after ezjail, but that's not a good idea - you want your firewall to start early in the ... | Freebsd: pf firewall doesn't work on restart |
1,398,727,302,000 |
Question
I want to separate PHP (PHP-FPM) and Nginx into different jails. One jail with Nginx, and one with PHP-FPM / PHP / Wordpress.
Nginx is good at serving static assets, so I would like to serve those directly with Nginx. How can I mount a folder from one jail into another jail (read-only)?
I also have a Nodejs ... |
nullfs can be used to give a jail read-only access to parts of the host's file system. All the jails live within the host's file system, so the idea of jail-to-jail access is moot.
On my system (and I do jails the hard way) I have the following directive in /etc/jails.conf:
mount.fstab = "/etc/fstab.${name}";
which m... | FreeBSD jails - Nginx, PHP-FPM, Wordpress - Share folder between jails (read-only) |
1,398,727,302,000 |
Why does chroot operation result in error: "bash: /root/.bashrc: Permission denied"?
I've been testing chroot for learning purposes, and have encountered the following error, when executing /bin/bash:
nlykkei@debian:~$ id
uid=1000(nlykkei) gid=1000(nlykkei) groups=1000(nlykkei),27(sudo)
nlykkei@debian:~$ sudo chroot -... |
Passing --userspec to chroot is not the same thing as running su - user inside the chroot environment; i.e. the home directory is still that of root i.e. /root which is why bash is trying to read /root/.bashrc which is not allowed for non-root users.
Your second problem is probably due to not having included all the n... | Why does `chroot` operation result in error: "bash: /root/.bashrc: Permission denied"? |
1,398,727,302,000 |
I have been reading over the creation of Jails on FreeBSD, and one stumbling block I have is regarding network interfaces.
Say my local router is 10.0.2.1, and the BSD box is 10.0.2.5. I would like jails on 10.0.2.6-10.
Do I just define them in rc.conf (without any other work), or do I have to set up a bridge or some... |
Jails get ip aliases on your network interface. If the jails use the same interface as the host and are on the same subnet you don't need to do any additional routing.
If your jails do not use the same interface you would need to bridge the primary interface with the interface the Jails use.
| Network interfaces for Jails |
1,398,727,302,000 |
I want to let some of my friends access my computer by making them user accounts. They will mostly access my computer by sftp and ssh, but they could also sometimes access it at my home. However I don't want them to be able to see all my file (not my personal files from my home directory, I mean files that reside outs... |
Depending on what "fully use all my programs" means, the options are:
Use standard Unix file permissions to protect your files. The advantage here is that it's really easy to set up as it's just a matter of deciding which files you want protected and setting the appropriate permissions on them. The downside is that y... | How to completely hide stuff from a user? |
1,398,727,302,000 |
My title question is exactly my question : is it possible to create a freebsd 10 or 11 jail into a freebsd 9 instance?
|
The jail and the host system will both share the same kernel. So:
Old jail, recent host: Running an outdated jail on a newer host should not cause any issue (the FreeBSD kernel will ensure retro-compatibility, enabled by default even for pre-FreeBSD 8 kernel as a kernel compilation option),
Recent jail, old host: I w... | Is it possible to create a freebsd 10 or 11 jail in freebsd 9? |
1,398,727,302,000 |
I created a chroot jail and copied multiple binaries and their corresponding libraries to the relevant subdirectories. Example:
cp -v /usr/bin/edit /home/jail/usr/bin
ldd /usr/bin/edit
linux-vdso.so.1 (0x00007fff565ae000)
libm.so.6 => /lib64/libm.so.6 (0x00007f7749145000)
libtinfo.so.5 => /lib6... |
You should type the command strace -f man ls 2>ls.log and see how many execve lines there are in the ls.log file. You will have /usr/bin/pager, nroff, groff, tbl… groff would surely need a lot of files to work properly. See how many openat in the log file are successful.
| man returns execve: No such file or directory in chroot jail |
1,398,727,302,000 |
I am trying to secure a custom application as much as possible from outside tampering.
I've seen many pages on jailing a user, but they usually include many exceptions, and I want to lock down this user as much as possible.
The user only needs to execute an application that is a websocket++ client & server that needs ... |
if you really
want to lock down this user as much as possible
create a virtual machine. The chroot don't really isolate this process.
If a real virtual machine is too heavy, maybe you can have a look at linux containers, a lightweight version of virtual machine. Harder to configure though.
If you want something even... | Absolutely jail a user with minimum IP, file, & command rights |
1,398,727,302,000 |
I want a process (and all its potential children) to be able to read the filesystem according to my user profile but I want to restrict that process's write permission to only a set of pre-selected folders (potentially only one).
chroot seems to act too broadly. Restricting the process to a particular part of the file... |
firejail does the job:
mkdir -p ~/test && firejail --read-only=/tmp --read-only=~/ --read-write=~/test/ touch ~/test/OK ~/KO /tmp/KO
| Restrict linux process write permission to one folder |
1,398,727,302,000 |
Is it possible to jail an older 32-bit FreeBSD, such as 6.4 or 8.4 in a 64-bit FreeBSD 10.2?
I'll also appreciate pointers and explanations on how to accomplish this and information on what prerequisites my host needs to fulfill.
NB: according to this blog article, jailing an older FreeBSD on a current one is possible... |
COMPAT_FREEBSD32 needs to be enabled in your FreeBSD kernel (It is enabled in the GENERIC kernel)
There might be problems with the 32bit ps and top programs.
| Can I jail an older 32-bit FreeBSD on a (current) 64-bit FreeBSD? |
1,398,727,302,000 |
I'm trying to setup a chroot jail, but I'm not sure how to make this work in SSH and SFTP. A quick question, will something like this work for both SSH and SFTP or just SSH? If it doesn't work for both, how can I setup a chroot jail (or an alternative) to do so?
|
If SSH does a chroot, then it will be effective for all processes started by SSH.
| Is a Chroot Jail for SSH *and* SFTP? |
1,398,727,302,000 |
First of all, I know about virtualisation and containers. I'm sure "he wants containers" is what popped in your mind. (Don't deny it!)
However containers are like chroot: if you want to execute bash in it, you need to copy/mirror a bash executable somewhere in the container FS as well as all the required libs. (If I m... |
I think you're probably looking for containers.
Or perhaps not. Linux namespaces can be pretty transparent, after all. I don't believe there is a way to unshare a namespace for a process which has already been called, but you definitely can unshare a namespace at call time with little to no effect.
cd /tmp
echo you ... | Is there a way to isolate a running program from the rest of a Linux system? |
1,398,727,302,000 |
I use FreeBSD 9.1 64-bit from the list here.
On my freebsd amazon instance, I have a jail running :
# jls
JID IP Address Hostname Path
1 192.168.1.101 01.gideon.com /jails/01.gideon.com
If I goto that jails console I can't install perl on it. (If I do portsnap fetch insi... |
Modification of networking inside FreeBSD jail isn't allowed. A jail can use all host addresses, a few ones (restricted set, configured during a jail creating) or no networking at all. And, as far as I see, allowed IPs are automatically placed on interfaces seen inside the jail.
You should specify exact FreeBSD versio... | enable networking inside a freebsd jail |
1,398,727,302,000 |
Is it conceptually possible to take a FreeBSD jail and copy the contents to my root filesystem and expect it to boot up?
Note that because the jail doesn't have a kernel, I will have to copy that from the original host.
I'd like to make whatever configuration changes I want and use that as a starting point for my real... |
The original question was aimed at streamlining the BSD installation process. After having installed FreeBSD numerous times and scripting the install, this question is a different way to go about it and not that useful.
The installation can be completely automated, allowing for hands-free installation.
To answer the ... | Can the contents of a FreeBSD jail be installed as the main OS? |
1,472,759,778,000 |
I'm running FreeNAS (v9.2.1.9) as a file and media server and have several jails installed, some of them as plugin jails others as "standard" jails.
After I had replaced one of the plugin jails by a "standard" (hand made) jail, I wanted to remove the old plugin jail. I rushed ahead by just deleting the dataset on whic... |
I had a similar issue on FreeNAS 9.3 and could not find a remove button. I got it to disappear by going to the jails volume, and removing the directory which held the jail:
# rm -fr /mnt/black/jails/.couchpotato_1.meta/
This also removed the complaints during boot. No negative side effects seen yet.
| How to remove a (plugin) jail from FreeNAS |
1,472,759,778,000 |
I'm in the process of setting up a FreeBSD 10 server with just some services on a KVM server:
NGINX webserver w PHP-FPM
2 domains, 3 subdomains
Mailserver
3 Email addresses
MySQL (or other) database server if needed
The server will only be administered by me. One SSH account with sudo access and later a second one w... |
It's really up to you.
The benefit of setting up jails is that you're going to separate security issues that come up between the jails, as well as making it easier to upgrade and manage them separately, which can increase reliability.
The downside of setting up the jails of course is that you have to learn it, it's a ... | FreeBSD 10: Do I need jails? |
1,472,759,778,000 |
I would like to know how I can constraint a user to only be able to access and have RWX permissions to directories like /etc/httpd, /etc/php and /var/www/html as well as its own home directory.
Also I would like to be able to constraint this user to be able to only star/stop/restart apache service.
All I could think... |
A jailed user won't be able to access those folders as-is. If you have acl enabled on the filesystem, you could create a regular user and control access to the directories by using an access control list.
To give user 'Bob' access to the directories, create a group, place Bob in that group and then recursively give... | chroot an user to more than one directory in different locations |
1,472,759,778,000 |
I want to be able to generically pick a certain executable (potentially malicious) x and run it (from an admin account) with write access restricted to certain directories (dynamically deduced) "${dirs[@]}".
The executable should have access to whatever is globally accessible on the system.
I figured I could use simpl... |
First sorry for my bad english. Lets show something for you using only unix concepts, cause i think it can help (or maybe not).
Imagine that i want that the executable nano can be executed by every users, but must never run as the user that call its executable, but with a limited environment, with access to edit the ... | Globally writable files and user-based process jailing |
1,472,759,778,000 |
Update: I'm happy to report @dartonw 's answer worked and I went and did a checkout and then buildworld and it built successfully in about 6 hours.
So I've been having some issues with jails in freebsd. I run FreeBSD9.1 64 bit on EC2 as a small instance. I recently tried :
cd /usr/src;make buildworld
And after nine ... |
You can use Subversion in basically the same way as documented for cvsup. In short:
# portsnap update
# cd /usr/ports/devel/subversion
# make install clean
Then to update /usr/src (assuming you have sources installed):
# svn update /usr/src
If sources are not already installed in /usr/src, you can check out a fresh ... | the right way to synchronise sources on freebsd |
1,472,759,778,000 |
This question is actually too broad...
What I really want to know is whether or not it actually chroots and, if so, how a SSH user deamon[1] can be launched in that jail in spite of the obvious lack of the required binary/lib in the chroot.
Google is surprisingly silent on the matter. But a good reference to explain... |
The other answer is quite vague (also the question is) so I will try to be more verbose about this phenomen. I know that this topic is not for everybody, but for these interested it is quite nice thing to know about.
There are two different places where the chroot is done and you are poking into both of them so I will... | How is OpenSSH sftp jail/chroot working? |
1,472,759,778,000 |
I have been trying to get Forgejo running in a Truenas Core (FreeBSD jail) for over a week. When I manually start Forgejo as the git user it runs as expected, however attempting to get it to run with the included rc file provided by the ports package it errors out.
Forgejo Port
rc.d script
When I start forgejo manuall... |
2024-03-07, archived:
WARNING - don't upgrade your TrueNAS CORE jails to FreeBSD 13.3 just yet | TrueNAS Community
Today, https://forums.freebsd.org/threads/forgejo-failing-to-start-as-service-pid-file-not-readable.93214/#post-653734:
FreeBSD 13.3
TrueNAS CORE 13.3 is not yet released.
TrueNAS CORE 13.3 Plans - An... | Forgejo pid file (/var/run/forgejo.pid) : not readable in Truenas Core (FreeBSD Jail) |
1,472,759,778,000 |
I've inherited some systems that run on freebsd and inside jails. Basically the services running are old versions of qmail, spamd, dovecot, etc. None of the versions are up to date or even maintainable any more.
At present we can't move from these systems but I would at least like to be able to troubleshoot them.
My... |
# jls
JID IP Address Hostname Path
1 127.0.0.2 ports12.localhost /SPACE/jails/ports12
2 127.0.0.3 py37jail.localhost /SPACE/jails/py37jail
OK now I know what jails are running. I'm going to logon as root as root is understood in the ports12.l... | how can I manage services running in freebsd jail |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.