Re: Need help porting ifcfg-ppp0 config to NetworkManager

2020-03-28 Thread Bjørn Mork via networkmanager-list
David Howells via networkmanager-list 
writes:

> Andrei Borzenkov  wrote:
>
>> The same effect can probably be achieved by setting /128 local address
>> and adding /128 route to peer address.
>
> Any suggestion as to what address I should set?  My address block is
> 2001:8b0:194::/48 if that helps.  I've tried setting a random one from that,
> but it causes an error ("cif6addr: ioctl(SIOCDIFADDR): No such address" I
> think - I can't try it just now).



> I've also tried setting a route, but that didn't seem to work either
> ("sif6addr: ioctl(SIOCADDRT): Permission denied (line 2646)" I think was the
> error).
>
> Further, NM doesn't allow me to specify a peer address ("ipv6 ," is the only
> parameter that it will specify, with both addresses omitted), and I don't know
> how to automatically retrieve the peer address from within the NM framework.

Note that you don't specify the peer address in your ifcfg file either.
pppd(8) documents it as

  ipv6 ,

and that's what it is.  These are input values for IPV6CP, which doesn't
negotiate addresses or routing. That's supposed to be configured the
same way as for any other IPv6 link: Using SLAAC and DHCPv6.  Which
makes IPv6 over PPP pretty different from IPv4 over PPP, but exactly the
same as IPv6 over anything else.

The negotiated interface identifiers will be combined with fe80::/64 to
create link local addresses and with any on-link prefixes advertised in
RAs.

There is no IPv6 default route option either AFAIK.  But I believe it
would make sense to offer this as an alternatve in NM for cases where
the peer doesn't send any RA.  It is a pretty common use case.


Bjørn
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Need help porting ifcfg-ppp0 config to NetworkManager

2020-03-28 Thread David Howells via networkmanager-list
Andrei Borzenkov  wrote:

> The same effect can probably be achieved by setting /128 local address
> and adding /128 route to peer address.

Any suggestion as to what address I should set?  My address block is
2001:8b0:194::/48 if that helps.  I've tried setting a random one from that,
but it causes an error ("cif6addr: ioctl(SIOCDIFADDR): No such address" I
think - I can't try it just now).

I've also tried setting a route, but that didn't seem to work either
("sif6addr: ioctl(SIOCADDRT): Permission denied (line 2646)" I think was the
error).

Further, NM doesn't allow me to specify a peer address ("ipv6 ," is the only
parameter that it will specify, with both addresses omitted), and I don't know
how to automatically retrieve the peer address from within the NM framework.

Thanks,
David

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Advice Needed.

2020-03-28 Thread slavkomihajl via networkmanager-list
Good day.
My name is Slavko Mihajlovic and I am a Network Admin and a penetration tester 
from Serbia, with maybe an unusual inquiry.The newer Network Managers, I tried 
ubuntu 18.04 and 19.02, kali 2019 and 2020 all seem to keep disconnecting wifi 
pineapple so I am interested in writing a variation of a Network Manager which 
wouldn't do so, also the Network Manager tries to source the connection from 
the network device which was installed last, I would like to create a way of 
changing this aproach.Any advice or information as to where to start a project 
like this would be most appreciated. I would ofcourse fully credi you and make 
the source code public.
Thank you in advance.
Slavko Mihajlovic

Sent with [ProtonMail](https://protonmail.com) Secure Email.___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Need help porting ifcfg-ppp0 config to NetworkManager

2020-03-28 Thread David Howells via networkmanager-list
Beniamino Galvani  wrote:

> this should create a connection mostly equivalent to your
> configuration:
> 
>  nmcli connection add \
>type pppoe ifname ppp0 pppoe.parent enp4s0 \
>pppoe.user $myuser pppoe.password $mypw \
>ppp.mru 1492 ppp.mtu 1492 \
>ppp.lcp-echo-interval 1 ppp.lcp-echo-failure 120 \
>ipv4.address $myip
> 
> 'man nm-settings' shows all the properties supported by NM. I don't
> think "holdoff 1" is needed as NM always waits some seconds before
> reinitiating the connection.

Okay, that gets me a step closer, thanks.  I can actually bring up the
connection now.

> Also, I'm not sure IPv6 is supported. You could try adding 'ipv6.method
> manual ipv6.addresses $myip6' but it doesn't seem possible to specify a peer
> address.

It seems I don't need to specify explicit addresses for the link.  Passing
"ipv6 ," to pppd works sufficiently well from ifcfg-ppp0.

Looking at src/ppp/nm-ppp-manager.c in NetworkManager, I can see that NM can
pass this to pppd:

if (ip6_enabled) {
/* Allow IPv6 to be configured by IPV6CP */
nm_strv_ptrarray_add_string_dup (cmd, "ipv6");
nm_strv_ptrarray_add_string_dup (cmd, ",");
} else
nm_strv_ptrarray_add_string_dup (cmd, "noipv6");

if ip6_enabled is true, which is a condition checked by the caller:

ip6_method = nm_utils_get_ip_config_method (connection, AF_INET6);
ip6_enabled = nm_streq (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_AUTO);

and setting ipv6.method to "auto" does indeed do this, but no routing is set
when the route comes up.  Doing "ifup ppp0" has pppd set the route, but this
is disabled by nm-ppp-manager, so I'm not sure how to configure an outside
route.

I've tried setting a route of "::/0" for the ppp connection, but that doesn't
seem to work and I suspect I'm not doing it right.  For that matter, if I
disable ipv6 over ppp and just bring up the connection with ipv4, I'm not sure
how/why a global route is set.

> Note that the connection has 'autoconnect yes' by default and so it is
> started automatically at boot. If you want to activate it manually,
> you should also set 'autoconnect no', and then control it with:

I definitely need it to come up automatically.

David

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list