Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #245007 > unrolled thread
| Started by | Kamil Jońca <kjonca@o2.pl> |
|---|---|
| First post | 2022-02-04 19:40 +0100 |
| Last post | 2022-02-07 03:10 +0100 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.debian.user
interface/network scripting - how to? Kamil Jońca <kjonca@o2.pl> - 2022-02-04 19:40 +0100
Re: interface/network scripting - how to? john doe <johndoe65534@mail.com> - 2022-02-05 07:30 +0100
Re: interface/network scripting - how to? Anssi Saari <as@sci.fi> - 2022-02-05 11:50 +0100
Re: interface/network scripting - how to? David Wright <deblis@lionunicorn.co.uk> - 2022-02-07 03:10 +0100
| From | Kamil Jońca <kjonca@o2.pl> |
|---|---|
| Date | 2022-02-04 19:40 +0100 |
| Subject | interface/network scripting - how to? |
| Message-ID | <DNbF0-2Lk-9@gated-at.bofh.it> |
Current situation:
debian laptop with interfaces defined in /etc/network/interfaces
+ resolvconf package and bunch of scripts wchich configures network
(routes and name resolving) according to interfaces/vpn up down.
For example
1. I am connected to home1 network (connected by wifi, no default
routing ), this network sets routing to some subnets with dhcp option
121 (and dhclient scripts handles this)
2. I am connected via etch to router with default gateway
3. I am connected to work1 network via openvpn tunnel.
4. I am connected to work2 network via ipsec gateway.
I want to (and with my current config this is done)
that:
1. proper routes are established (especially these with option 121)
2. name resolving is properly configured:
ie. home1.tld DNS queries are passed to home1 network
work1.tld DNS queries are passed to work1 network (via openvpn tunnel)
work2.tld DNS queries are passed to work2 network (via ipsec tunnel)
I am quite happy with my current config but sometimes I can read that
/etc/network/interfaces is "deprecated" in favor of systemd-networkd or
netplan.
So I have two questions:
1. Should I prepare migration?
2. How these things can be achieved with systemd-networkd? I read the
manuals, but I was not able to find working examples and I am not sure
where can I start.
KJ
--
http://wolnelektury.pl/wesprzyj/teraz/
[toc] | [next] | [standalone]
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Date | 2022-02-05 07:30 +0100 |
| Message-ID | <DNmK6-19r-3@gated-at.bofh.it> |
| In reply to | #245007 |
On 2/4/2022 7:14 PM, Kamil Jońca wrote: > > Current situation: > debian laptop with interfaces defined in /etc/network/interfaces > + resolvconf package and bunch of scripts wchich configures network > (routes and name resolving) according to interfaces/vpn up down. > For example > 1. I am connected to home1 network (connected by wifi, no default > routing ), this network sets routing to some subnets with dhcp option > 121 (and dhclient scripts handles this) > 2. I am connected via etch to router with default gateway > 3. I am connected to work1 network via openvpn tunnel. > 4. I am connected to work2 network via ipsec gateway. > > I want to (and with my current config this is done) > that: > 1. proper routes are established (especially these with option 121) > 2. name resolving is properly configured: > ie. home1.tld DNS queries are passed to home1 network > work1.tld DNS queries are passed to work1 network (via openvpn tunnel) > work2.tld DNS queries are passed to work2 network (via ipsec tunnel) > I am quite happy with my current config but sometimes I can read that > /etc/network/interfaces is "deprecated" in favor of systemd-networkd or > netplan. > So I have two questions: > 1. Should I prepare migration? I would not put that on the front burner but experimenting with Systemd might not be a bad idea. > 2. How these things can be achieved with systemd-networkd? I read the > manuals, but I was not able to find working examples and I am not sure > where can I start. > The Systemd mailing lists! -- John Doe
[toc] | [prev] | [next] | [standalone]
| From | Anssi Saari <as@sci.fi> |
|---|---|
| Date | 2022-02-05 11:50 +0100 |
| Message-ID | <DNqNI-3uA-5@gated-at.bofh.it> |
| In reply to | #245007 |
Kamil Jońca <kjonca@o2.pl> writes: > 2. name resolving is properly configured: > ie. home1.tld DNS queries are passed to home1 network > work1.tld DNS queries are passed to work1 network (via openvpn tunnel) > work2.tld DNS queries are passed to work2 network (via ipsec tunnel) So how have you setup this part? I always thought this needs a local name server, such as systemd-networkd provides and which I switched to once I heard it had been implemented. Before I had just wobbly resolvconf which usually got the DNS setup wrong. I managed fix it so it was mostly OK but it was never good. > I am quite happy with my current config but sometimes I can read that > /etc/network/interfaces is "deprecated" in favor of systemd-networkd or > netplan. I never heard that. > So I have two questions: > 1. Should I prepare migration? If you're happy with the setup, I don't see why. Well, if you like to learn new things, sure, go for it. I just find it a bit of pain to make major changes to my network. I did recently replace my router but since it was just a router for wired connections it was fairly easy to replace it once I had configured the new one. > 2. How these things can be achieved with systemd-networkd? I read the > manuals, but I was not able to find working examples and I am not sure > where can I start. I do have a similar if simpler setup, I just have a single VPN (openvpn) connection to the internet and have a local network of a few machines. DNS queries go either to my router or the VPN provider's DNS, depending on the interface. I can't remember how I got started with systemd-networkd, it's been a few years. Internet searches probably. systemd documentation is a decent reference but as such they don't usually tell you how to build something specific. I don't remember any particular difficulty in finding pages on how to get started.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2022-02-07 03:10 +0100 |
| Message-ID | <DO1Dz-4bN-9@gated-at.bofh.it> |
| In reply to | #245007 |
On Fri 04 Feb 2022 at 19:14:45 (+0100), Kamil Jońca wrote: > > Current situation: > debian laptop with interfaces defined in /etc/network/interfaces > + resolvconf package and bunch of scripts wchich configures network > (routes and name resolving) according to interfaces/vpn up down. > For example > 1. I am connected to home1 network (connected by wifi, no default > routing ), this network sets routing to some subnets with dhcp option > 121 (and dhclient scripts handles this) > 2. I am connected via etch to router with default gateway > 3. I am connected to work1 network via openvpn tunnel. > 4. I am connected to work2 network via ipsec gateway. As you can see from Anssi Saari's reply, it sometimes helps to give a bit more information than the above in order to trigger more responses. > I want to (and with my current config this is done) > that: > 1. proper routes are established (especially these with option 121) > 2. name resolving is properly configured: > ie. home1.tld DNS queries are passed to home1 network > work1.tld DNS queries are passed to work1 network (via openvpn tunnel) > work2.tld DNS queries are passed to work2 network (via ipsec tunnel) > I am quite happy with my current config but sometimes I can read that > /etc/network/interfaces is "deprecated" in favor of systemd-networkd or > netplan. > So I have two questions: > 1. Should I prepare migration? It's often worth having a second string just in case something ceases to work. (But I've not seen deprecation mentioned either.) So, for example, I've been chacking out iwd, since wicd has now gone. > 2. How these things can be achieved with systemd-networkd? I read the > manuals, but I was not able to find working examples and I am not sure > where can I start. I guess you've read things like man systemd-networkd, man systemd.network and man systemd.netdev, but the numerous examples at the end of the latter two might yield some good search terms to turn up further information. There may be some extra info in the Arch wikis, but the Debian ones seem to just regurgitate the man pages. Cheers, David.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web