Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-26 Thread Andy Smith
Hello,

On Sat, Mar 26, 2022 at 08:48:35AM -0400, Greg Wooledge wrote:
> Maybe I should remove the trinity-3c-app-mailcom block, since it
> no longer seems to be doing anything helpful...?

Looking at my mailbox I've got hundreds of hits matching that, from
many differently apparently-real people all over the world. I
suspect it's just the signature of a particular email app.

Cheers,
Andy



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-26 Thread David
On Sat, 26 Mar 2022 at 23:48, Greg Wooledge  wrote:
> On Fri, Mar 25, 2022 at 11:43:36PM -0500, David Wright wrote:
> > On Fri 25 Mar 2022 at 07:31:14 (+0100), Stella Ashburne wrote:

> If "Stella" is
> a real person who has been blocked as collateral damage, well, that's
> unfortunate.

You can judge for yourself.

https://lists.debian.org/cgi-bin/search?P=Stella+Ashburne=and=Gdebian-user

No resemblance to your troll that I can see.



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-26 Thread Greg Wooledge
On Fri, Mar 25, 2022 at 11:43:36PM -0500, David Wright wrote:
> In passing, I'm mystified by your quoting mechanism thinking
> it appropriate to display my time header in Chinese time:
> $ TZ='Asia/Shanghai' date --date='Thu, 24 Mar 2022 21:09:41 -0500'
> Fri Mar 25 10:09:41 CST 2022
> $ 
> 
> On Fri 25 Mar 2022 at 07:31:14 (+0100), Stella Ashburne wrote:
> 
> > Sent: Friday, March 25, 2022 at 10:09 AM
> > From: "David Wright" 

Some MUAs show the message's Date in the reader's local time zone,
or at least what it *thinks* the reader's local time zone is.  I don't
know why you'd be shocked by that.  They're using an MUA which makes
up its own pseudo-headers like "Sent:".  I'm not sure whether it's
web-based or not.

The only other thing I know about that MUA is that the most evil person
I've ever encountered on the Internet used it to create literally
dozens of fake personas in order to troll the bash mailing lists.
Therefore, it's in my killfile.  I'm not seeing any messages from "Stella"
except when they're quoted.  If "Stella" is one of the fake personas
created by that person, then it's working as intended.  If "Stella" is
a real person who has been blocked as collateral damage, well, that's
unfortunate.  But email is never going to be perfect.

This is the regex I added to my killfile:

^Message-ID: 

Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-26 Thread Curt
On 2022-03-26, David Wright  wrote:
>> 
>> When the /etc/network/interfaces file has the line
>> 
>> source-directory /etc/network/interfaces.d/*
>
> An eccentric choice. But no elaboration, opinion, or reasoning.
>
>> Best wishes.
>
> To you too. Over and out.

I think it was John Hasler who informed us one day that it was either
one or the other and that in fact the terms are contradictory, Over
denoting the transmitter is done speaking and is expecting a response
and Out signifying one was terminating the exchange.

So you mean out, I bet.

:-)
> Cheers,
> David.
>
>


-- 




Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-25 Thread David Wright
In passing, I'm mystified by your quoting mechanism thinking
it appropriate to display my time header in Chinese time:
$ TZ='Asia/Shanghai' date --date='Thu, 24 Mar 2022 21:09:41 -0500'
Fri Mar 25 10:09:41 CST 2022
$ 

On Fri 25 Mar 2022 at 07:31:14 (+0100), Stella Ashburne wrote:

> Sent: Friday, March 25, 2022 at 10:09 AM
> From: "David Wright" 

> > Please elaborate on what you mean by "correct" in this context,
> > and also give your opinion on the correctness or otherwise of
> > this line:
> >
> >   source-directory /etc/network/interfaces.d
> >
> > Without knowing the reasoning behind your statement, there's
> > not a lot more help I can give.
> >
> 
> My distro is Debian 11
> 
> Attempt #1
> 
> When the /etc/network/interfaces file has the line
> 
> source-directory /etc/network/interfaces.d/*

An eccentric choice. But no elaboration, opinion, or reasoning.

> Best wishes.

To you too. Over and out.

Cheers,
David.



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-25 Thread Stella Ashburne
Mon cheri

> Sent: Friday, March 25, 2022 at 10:09 AM
> From: "David Wright" 
> To: debian-user@lists.debian.org
> Subject: Re: Under each of these scenarios, what is the neatest and simplest 
> way to manipulate the /etc/network/interfaces file?
>
> Please elaborate on what you mean by "correct" in this context,
> and also give your opinion on the correctness or otherwise of
> this line:
>
>   source-directory /etc/network/interfaces.d
>
> Without knowing the reasoning behind your statement, there's
> not a lot more help I can give.
>

My distro is Debian 11

Attempt #1

When the /etc/network/interfaces file has the line

source-directory /etc/network/interfaces.d/*

and the following three files have the .hidden in /etc/network/interfaces.d/

lan.hidden
usb0.hidden
wlo1.hidden

Upon reboot and in a terminal:

username@hostname:~$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
2: wlo1:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether e5:d3:a2:b9:c3:27 brd ff:ff:ff:ff:ff:ff
altname wln0s7
username@hostname:~$ sudo ifup wlo1.hidden
[sudo] password for username:
ifup: unknown interface wlo1.hidden
username@hostname:~$ sudo ifup wlo1
ifup: unknown interface wlo1
username@hostname:~$


Attempt #2

When the /etc/network/interfaces file has the line

source-directory /etc/network/interfaces.d/*

and the following three files do NOT have the .hidden in 
/etc/network/interfaces.d/

lan
usb0
wlo1

Upon reboot and in a terminal:

username@hostname:~$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
2: wlo1:  mtu 1500 qdisc noqueue state UP 
group default qlen 1000
link/ether e5:d3:a2:b9:c3:27 brd ff:ff:ff:ff:ff:ff
altname wln0s7
inet 192.168.43.51/24 brd 192.168.43.255 scope global dynamic wlo1
   valid_lft 3576sec preferred_lft 3576sec
username@hostname:~$


Best wishes.

Stella







Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-24 Thread David Wright
On Thu 24 Mar 2022 at 03:12:23 (+0100), Stella Ashburne wrote:
> From: "David Wright" 
> > On Sat 19 Mar 2022 at 03:14:54 (+0100), Stella Ashburne wrote:
> > >
> > > There are instances in which my machine is connected to a mobile hotspot. 
> > > And in some situations, it's connected to a smartphone via USB tethering. 
> > > And when I'm in the office, I may connect it to a LAN cable.
> > >
> > > Below are the contents of my /etc/network/interfaces file:
> > >
> > > # This file describes the network interfaces available on your system
> > > # and how to activate them. For more information, see interfaces(5).
> > >
> > > source /etc/network/interfaces.d/*
> >
> > I would change this line to
> >
> > source-directory /etc/network/interfaces.d
> >
> On Debian 11, the line
> 
> source /etc/network/interfaces.d/*
> 
> is correct.

Please elaborate on what you mean by "correct" in this context,
and also give your opinion on the correctness or otherwise of
this line:

  source-directory /etc/network/interfaces.d

Without knowing the reasoning behind your statement, there's
not a lot more help I can give.

Cheers,
David.



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-23 Thread Stella Ashburne
Mon cheri

> Sent: Sunday, March 20, 2022 at 10:31 PM
> From: "David Wright" 
> To: debian-user@lists.debian.org
> Subject: Re: Under each of these scenarios, what is the neatest and simplest 
> way to manipulate the /etc/network/interfaces file?
>
> On Sat 19 Mar 2022 at 03:14:54 (+0100), Stella Ashburne wrote:
> >
> > There are instances in which my machine is connected to a mobile hotspot. 
> > And in some situations, it's connected to a smartphone via USB tethering. 
> > And when I'm in the office, I may connect it to a LAN cable.
> >
> > Below are the contents of my /etc/network/interfaces file:
> >
> > # This file describes the network interfaces available on your system
> > # and how to activate them. For more information, see interfaces(5).
> >
> > source /etc/network/interfaces.d/*
>
> I would change this line to
>
> source-directory /etc/network/interfaces.d
>
On Debian 11, the line

source /etc/network/interfaces.d/*

is correct.

>
> I would then hive off all your interface configurations into
> separate files in the directory /etc/network/interfaces.d
> using all-ASCII filenames constructed from upper/lower-case
> letters, digits, underscores, and minus-hyphens, as specified
> on the man page, but with the string ".hidden" added to the end,
> thus:
>
> myphone-tethered.hidden
> office-wired.hidden
> wifi.hidden
> hotspot.hidden
>
> and so on. Files with a dot are ignored when included by means of
> a source-directory directive.
>

On Debian 11, files with a dot are NOT ignored when the line

source /etc/network/interfaces.d/*

is present in /etc/network/interfaces

I have tried the following:

Attempt #1

When the files have the dot in /etc/network/interfaces.d/*, e.g.

lan.hidden
usb0.hidden
wlo1.hidden

username@hostname:~$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
2: wlo1:  mtu 1500 qdisc noqueue state UP 
group default qlen 1000
link/ether e5:d3:a2:b9:c3:27 brd ff:ff:ff:ff:ff:ff
altname wln0s7
inet 192.168.43.51/24 brd 192.168.43.255 scope global dynamic wlo1
   valid_lft 3588sec preferred_lft 3588sec
username@hostname:~$

Attempt #2

When the files do NOT have the dot in /etc/network/interfaces.d/*, e.g.

lan
usb0
wlo1

username@hostname:~$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
2: wlo1:  mtu 1500 qdisc noqueue state UP 
group default qlen 1000
link/ether e5:d3:a2:b9:c3:27 brd ff:ff:ff:ff:ff:ff
altname wln0s7
inet 192.168.43.51/24 brd 192.168.43.255 scope global dynamic wlo1
   valid_lft 3576sec preferred_lft 3576sec
username@hostname:~$

Summary: On Debian 11, files in /etc/network/interfaces.d/* do NOT require a 
DOT.

Best regards.

Stella




Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-23 Thread David Wright
On Wed 23 Mar 2022 at 13:35:13 (+0100), Stella Ashburne wrote:
> From: "David Wright" 
> > >
> > > source /etc/network/interfaces.d/*
> >
> > I would change this line to
> >
> > source-directory /etc/network/interfaces.d
> >
> > (which was the default on new buster installations).
> >
> Am I right to say that the default in Debian 11's installation is simply:
> 
> source /etc/network/interfaces.d/*

We already covered that in your thread entitled "What should I put
inside the file called wlan0?" You must remember, as it created
a brief back-and-forth:

https://lists.debian.org/debian-user/2022/03/msg00026.html

Any time you forget again, you can check for yourself,
as the file is created (when necessary) by the script:
/var/lib/dpkg/info/ifupdown.postinst (q.v.).

Cheers,
David.



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-23 Thread Stella Ashburne
Mon cheri

Your instructions and explanations are so clear and concise that even a 
beginner (what's the urban slang for it? Is it n00b?) is able to follow them 
without problems.

> Sent: Sunday, March 20, 2022 at 10:31 PM
> From: "David Wright" 
> To: debian-user@lists.debian.org
> Subject: Re: Under each of these scenarios, what is the neatest and simplest 
> way to manipulate the /etc/network/interfaces file?
>
> >
> > source /etc/network/interfaces.d/*
>
> I would change this line to
>
> source-directory /etc/network/interfaces.d
>
> (which was the default on new buster installations).
>
Am I right to say that the default in Debian 11's installation is simply:

source /etc/network/interfaces.d/*

>
> The thing to remember (and so many don't) is that the /e/n/i
> files are retaining the active network configuration, and
> need to be kept in place until you have downed the interface.
> Only /then/ should you make changes to the files.
>
> Don't do what works with many other daemons, which is to change
> the configuration files first, and then try to "restart" networking:
> ifdown followed by ifup. That confuses it.
>
The above is very instructive. I really appreciate it. Thanks.

Best wishes

Stella



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-21 Thread David Wright
On Mon 21 Mar 2022 at 06:05:48 (+), Tim Woodall wrote:
> On Sun, 20 Mar 2022, David Wright wrote:
> > On Sat 19 Mar 2022 at 03:14:54 (+0100), Stella Ashburne wrote:
> > > 
> > > There are instances in which my machine is connected to a mobile hotspot. 
> > > And in some situations, it's connected to a smartphone via USB tethering. 
> > > And when I'm in the office, I may connect it to a LAN cable.
> > > 
> > > Below are the contents of my /etc/network/interfaces file:
> > > 
> > > # This file describes the network interfaces available on your system
> > > # and how to activate them. For more information, see interfaces(5).
> > > 
> > > source /etc/network/interfaces.d/*
> > 
> > I would change this line to
> > 
> > source-directory /etc/network/interfaces.d
> > 
> > (which was the default on new buster installations).
> > 
> > I would then hive off all your interface configurations into
> > separate files in the directory /etc/network/interfaces.d
> > using all-ASCII filenames constructed from upper/lower-case
> > letters, digits, underscores, and minus-hyphens, as specified
> > on the man page, but with the string ".hidden" added to the end,
> > thus:
> > 
> > myphone-tethered.hidden
> > office-wired.hidden
> > wifi.hidden
> > hotspot.hidden
> > 
> > and so on. Files with a dot are ignored when included by means of
> > a source-directory directive.
> 
> I think just commenting out the allow-hotplug lines is sufficient. Then
> you can use ifup/ifdown at will. The only 'problem' will be that an
> interface doesn't start at boot.

And that would be a killer for a sizeable proportion of users.
I don't run any true headless systems myself, but I usually
start my non-laptops with wakeonlan, which would become futile
along with all the other power management wakening options.

> (I'd second splitting into separate files anyway)

Cheers,
David.



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-21 Thread Tim Woodall

On Sun, 20 Mar 2022, David Wright wrote:


On Sat 19 Mar 2022 at 03:14:54 (+0100), Stella Ashburne wrote:


There are instances in which my machine is connected to a mobile hotspot. And 
in some situations, it's connected to a smartphone via USB tethering. And when 
I'm in the office, I may connect it to a LAN cable.

Below are the contents of my /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*


I would change this line to

source-directory /etc/network/interfaces.d

(which was the default on new buster installations).

I would then hive off all your interface configurations into
separate files in the directory /etc/network/interfaces.d
using all-ASCII filenames constructed from upper/lower-case
letters, digits, underscores, and minus-hyphens, as specified
on the man page, but with the string ".hidden" added to the end,
thus:

myphone-tethered.hidden
office-wired.hidden
wifi.hidden
hotspot.hidden

and so on. Files with a dot are ignored when included by means of
a source-directory directive.



I think just commenting out the allow-hotplug lines is sufficient. Then
you can use ifup/ifdown at will. The only 'problem' will be that an
interface doesn't start at boot.

(I'd second splitting into separate files anyway)



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-20 Thread David Wright
On Sat 19 Mar 2022 at 03:14:54 (+0100), Stella Ashburne wrote:
> 
> There are instances in which my machine is connected to a mobile hotspot. And 
> in some situations, it's connected to a smartphone via USB tethering. And 
> when I'm in the office, I may connect it to a LAN cable.
> 
> Below are the contents of my /etc/network/interfaces file:
> 
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> 
> source /etc/network/interfaces.d/*

I would change this line to

source-directory /etc/network/interfaces.d

(which was the default on new buster installations).

I would then hive off all your interface configurations into
separate files in the directory /etc/network/interfaces.d
using all-ASCII filenames constructed from upper/lower-case
letters, digits, underscores, and minus-hyphens, as specified
on the man page, but with the string ".hidden" added to the end,
thus:

myphone-tethered.hidden
office-wired.hidden
wifi.hidden
hotspot.hidden

and so on. Files with a dot are ignored when included by means of
a source-directory directive.

> 1. At the moment, if I wish to change to using a mobile hotspot from USB 
> tethering, I'll edit the /etc/network/interfaces file, uncomment the 
> applicable lines under #The primary network interface for wireless 
> connections and place a # in front of all the lines under #The primary 
> network interface for USB tethering
> 
> Instead of carrying out the above steps, is there a neater and simpler way?

Editing a file each time you make a change is error-prone.
To use any one of the interfaces with this mechanism, all
you have to do now is rename the file, removing the .hidden:

# mv -i /etc/network/interfaces.d/wifi.hidden /etc/network/interfaces.d/wifi

and that becomes the active one because there's no dot. (The
word "hidden" is my semantic sugar.) Vice versa to deactivate.

> 2. What is the command to type in a terminal after I have made changes to the 
> /etc/network/interfaces file without rebooting my machine?

# ifdown en……  (ie down the old interface)

# …(rename the files as explained above)

# ifup wl……(up the new interface)

The thing to remember (and so many don't) is that the /e/n/i
files are retaining the active network configuration, and
need to be kept in place until you have downed the interface.
Only /then/ should you make changes to the files.

Don't do what works with many other daemons, which is to change
the configuration files first, and then try to "restart" networking:
ifdown followed by ifup. That confuses it.

Cheers,
David.



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-19 Thread Eduardo M KALINOWSKI

On 19/03/2022 09:06, Stella Ashburne wrote:

No thank you. I won't touch NetworkManager or its variants with a ten foot 
pole. Why?

Reason #1

[quote] I am sorry but we do not support NetworkManager.

I would go so far as to say do not use it at all .. but Linux distros think it 
is some sort of magic ..[end quote]

Reply by TinCanTech, Forum Team, to the original post "Can connect via terminal, but 
not with NetworkManager" (URL: https://forums.openvpn.net/viewtopic.php?t=26802)

Reason #2

[quote] Due to multiple, critical  problems in network-manager-openvpn which after years have not 
been solved we recommend to NOT use it. Please understand that we will not provide support to 
network-manager-openvpn. In GNU/Linux we recommend that you run our free and open source software 
"Eddie", or our free and open source software "Hummingbird", or OpenVPN 
directly [end quote]

A notice posted by the staff of AirVPN under the title "Using AirVPN with Debian 
Network Manager (NOT RECOMMENDED)" (URL: 
https://airvpn.org/forums/topic/11416-using-airvpn-with-debian-network-manager-not-recommended/
)

Eduardo, I do use VPNs frequently in my line of work and always use the 
community edition of OpenVPN to connect to VPN servers directly.


Unfortunately I cannot say whether your use case will work with NM. I 
occasionally use a wireguard firewall, but I don't think I've used 
OpenVPN with NM.


However, note that the posts are from 2014 and 2018. A lot might have 
changed since then.



--
Why is it that we rejoice at a birth and grieve at a funeral?  It is because we
are not the person involved.
-- Mark Twain, "Pudd'nhead Wilson's Calendar"

Eduardo M KALINOWSKI
edua...@kalinowski.com.br



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-19 Thread hdv@gmail

On 2022-03-19 13:19, Eduardo M KALINOWSKI wrote:

On 19/03/2022 09:06, Stella Ashburne wrote:
No thank you. I won't touch NetworkManager or its variants with a ten 
foot pole. Why?


Reason #1

[quote] I am sorry but we do not support NetworkManager.

I would go so far as to say do not use it at all .. but Linux distros 
think it is some sort of magic ..[end quote]


Reply by TinCanTech, Forum Team, to the original post "Can connect via 
terminal, but not with NetworkManager" (URL: 
https://forums.openvpn.net/viewtopic.php?t=26802)


Reason #2

[quote] Due to multiple, critical  problems in network-manager-openvpn 
which after years have not been solved we recommend to NOT use it. 
Please understand that we will not provide support to 
network-manager-openvpn. In GNU/Linux we recommend that you run our 
free and open source software "Eddie", or our free and open source 
software "Hummingbird", or OpenVPN directly [end quote]


A notice posted by the staff of AirVPN under the title "Using AirVPN 
with Debian Network Manager (NOT RECOMMENDED)" (URL: 
https://airvpn.org/forums/topic/11416-using-airvpn-with-debian-network-manager-not-recommended/ 


)

Eduardo, I do use VPNs frequently in my line of work and always use 
the community edition of OpenVPN to connect to VPN servers directly.


Unfortunately I cannot say whether your use case will work with NM. I 
occasionally use a wireguard firewall, but I don't think I've used 
OpenVPN with NM.


However, note that the posts are from 2014 and 2018. A lot might have 
changed since then.


I think the chances of that are quite good. If only because I've been 
using the combination of NM and OpenVPN for about 5 years now and it's 
been ages ago I've had trouble with it.


Grx HdV



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-19 Thread Stella Ashburne
Mon cheri

Thanks for your reply.

> Sent: Saturday, March 19, 2022 at 3:17 PM
> From: "Tim Woodall" 
> To: "Stella Ashburne" 
> Cc: "debian-user mailing list" 
> Subject: Re: Under each of these scenarios, what is the neatest and simplest 
> way to manipulate the /etc/network/interfaces file?
>

>
> You can use mapping lines to achieve the same thing.
>

Oh dear, it seems complicated to me.

Best regards.

Stella



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-19 Thread Stella Ashburne
Mon cheri

> Sent: Saturday, March 19, 2022 at 7:13 PM
> From: "Eduardo M KALINOWSKI" 
> To: debian-user@lists.debian.org
> Subject: Re: Under each of these scenarios, what is the neatest and simplest 
> way to manipulate the /etc/network/interfaces file?
>
>
> That's exactly the kind of situation that NetworkManager is made for. It
> gained a bad reputation when it was released, but seems to have improved
> - I've been using it for years without issues.
>
> There's a command-line interface (nmcli), so you don't need a desktop
> environment.
>

No thank you. I won't touch NetworkManager or its variants with a ten foot 
pole. Why?

Reason #1

[quote] I am sorry but we do not support NetworkManager.

I would go so far as to say do not use it at all .. but Linux distros think it 
is some sort of magic ..[end quote]

Reply by TinCanTech, Forum Team, to the original post "Can connect via 
terminal, but not with NetworkManager" (URL: 
https://forums.openvpn.net/viewtopic.php?t=26802)

Reason #2

[quote] Due to multiple, critical  problems in network-manager-openvpn which 
after years have not been solved we recommend to NOT use it. Please understand 
that we will not provide support to network-manager-openvpn. In GNU/Linux we 
recommend that you run our free and open source software "Eddie", or our free 
and open source software "Hummingbird", or OpenVPN directly [end quote]

A notice posted by the staff of AirVPN under the title "Using AirVPN with 
Debian Network Manager (NOT RECOMMENDED)" (URL: 
https://airvpn.org/forums/topic/11416-using-airvpn-with-debian-network-manager-not-recommended/
)

Eduardo, I do use VPNs frequently in my line of work and always use the 
community edition of OpenVPN to connect to VPN servers directly.

Best regards.

Stella



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-19 Thread Eduardo M KALINOWSKI

On 18/03/2022 23:14, Stella Ashburne wrote:

Hi

There are instances in which my machine is connected to a mobile hotspot. And 
in some situations, it's connected to a smartphone via USB tethering. And when 
I'm in the office, I may connect it to a LAN cable.

Below are the contents of my /etc/network/interfaces file:

[...]

1. At the moment, if I wish to change to using a mobile hotspot from USB 
tethering, I'll edit the /etc/network/interfaces file, uncomment the applicable 
lines under #The primary network interface for wireless connections and place a 
# in front of all the lines under #The primary network interface for USB 
tethering

Instead of carrying out the above steps, is there a neater and simpler way?


That's exactly the kind of situation that NetworkManager is made for. It 
gained a bad reputation when it was released, but seems to have improved 
- I've been using it for years without issues.


There's a command-line interface (nmcli), so you don't need a desktop 
environment.



--
On-line, adj.:
The idea that a human being should always be accessible to a computer.

Eduardo M KALINOWSKI
edua...@kalinowski.com.br



Re: Under each of these scenarios, what is the neatest and simplest way to manipulate the /etc/network/interfaces file?

2022-03-19 Thread Tim Woodall

ifdown usb0

edit file

ifup wlo1

Will avoid the need to reboot.


You can use mapping lines to achieve the same thing.

mapping eth0
script /usr/local/sbin/map-scheme

iface eth0_home inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.254

iface eth0_work inet dhcp

and the map-scheme script needs to output eth0_home or eth0_work
depending on where the machine thinks it is.

(In this case I'd ping the home gatwway to detect. $1 will be eth0 in
the script)

On my laptop I have:

mapping intwlan0
script /usr/local/sbin/map-scheme.wlan
map 88:03:55:E0:AC:7F Brandon EE-kbfcwm
map B4:FB:E4:4D:28:4B MarshamCourt MarshamCourt
map 78:8A:20:2A:BE:C6 MarshamCourt MarshamCourt
map any unknown Avanti_Free_WiFi
map any hotel BWGarstangCountryHotel

and my script looks for access points to connect to.

This was written way back in the dark ages where real men used the
console - but it still works today :-)



On Sat, 19 Mar 2022, Stella Ashburne wrote:


Hi

There are instances in which my machine is connected to a mobile hotspot. And 
in some situations, it's connected to a smartphone via USB tethering. And when 
I'm in the office, I may connect it to a LAN cable.

Below are the contents of my /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug enx61s07
#iface enx60a4b79d7f48 inet static
#   address 192.168.1.35/24
#   gateway 192.168.1.1
   # dns-* options are implemented by the resolvconf package, if installed
#   dns-nameservers 1.1.1.1 8.8.8.8


# The primary network interface for USB tethering
allow-hotplug usb0
iface usb0 inet dhcp static
address 192.168.42.35
gateway 192.168.42.1
   # dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 1.1.1.1 8.8.8.8

# The primary network interface for wireless connections
#allow-hotplug wlo1
#iface wlo1 inet dhcp static
# wpa-ssid Osia27
# wpa-psk string-of-alphanumberice-characters
# address 192.168.43.28
# gateway 192.168.43.1
# dns-nameservers 1.1.1.1 8.8.8.8

Questions:

1. At the moment, if I wish to change to using a mobile hotspot from USB 
tethering, I'll edit the /etc/network/interfaces file, uncomment the applicable 
lines under #The primary network interface for wireless connections and place a 
# in front of all the lines under #The primary network interface for USB 
tethering

Instead of carrying out the above steps, is there a neater and simpler way?

2. What is the command to type in a terminal after I have made changes to the 
/etc/network/interfaces file without rebooting my machine?

Best regards.

Stella