Tinc on NixOS
Guus Sliepen
guus at tinc-vpn.org
Tue Aug 26 10:43:50 CEST 2014
On Mon, Aug 25, 2014 at 09:55:05PM -0700, Zia Syed wrote:
> I'm trying to run Tinc on a NixOS machine, using the similar configuration
> i had for Ubuntu. My home subnet is 192.168.1.0/24 and my work is
> 10.16.0.0/24. However, unlike ubuntu, when I start tincd on nixos, and try
> to 'ifconfig $INTERFACE 192.168.1.10 netmask 255.255.255.0' in my tinc-up,
> I loose network access on the box (no ping/ssh to the box). I see tun0
> interface created, but no data flows.
>
> eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
[...]
> #!/nix/store/ajxd1z42ql9qihdj1pa7in12iynf532g-bash-4.2-p45/bin/sh
> #ifconfig $INTERFACE 192.168.1.10 netmask 255.255.255.0
> ip route add 10.16.0.0/24 dev $INTERFACE
> ip link set dev $INTERFACE up
Like Saverio already said, you are configuring tun0 with exactly the
same IP address and netmask as the eno1 interface. This will indeed
cause you to lose network access. You can use the same IP address on
tun0 as on eno1, but then the netmask should be different. Try this
instead:
#!/nix/store/ajxd1z42ql9qihdj1pa7in12iynf532g-bash-4.2-p45/bin/sh
ip addr add 192.168.1.10 dev $INTERFACE
ip route add 10.16.0.0/24 dev $INTERFACE
ip link set dev $INTERFACE up
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20140826/aff5a77f/attachment.sig>
More information about the tinc
mailing list