You are not logged in.

#1 2014-06-01 10:16:44

Xtof
Member
From: Toulouse - France
Registered: 2014-03-22
Posts: 10

How to create a virtual ethernet interface in arch ?

I have subscribed to a distant VPN service. My computer acts as a VPN client and creates a new interface tun0 each time the VPN is active.
I want to only route the ip traffic from Transmission through VPN

I tried to follow the tutorial from here (sorry it's in french) but this tutorial is for debian-based distribs.

Since the VPN may have a dynamic IP, this tutorial proposes to create a 2nd virtual ethernet interface with a fixed IP adress. iptable is then used to perform NAT translation between the IP of this 2nd virtual ethernet interface and tun0.

With debian-based distributions, the creation the this new virtual ethernet interface is managed by adding the following lines to the file /etc/network/interfaces :

# The secondary loopback network interface
auto lo:1
        iface lo:1 inet static
        address 192.168.0.1
        netmask 255.255.255.255 

I'm not sure how to perform this in arch. I read a lot about the ip command and I think that the solution may be something like that :

ip tuntap add dev lo1 mode tap

but I'm not sure and moreover, I don't know how to give a fixed IP adress (i.e. 192.168.0.1) to this new interface

Any help would be really appreciated.

Offline

#2 2014-06-01 20:10:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to create a virtual ethernet interface in arch ?

It's just a wild guess, but maybe https://wiki.archlinux.org/index.php/Systemd-networkd would help?

Offline

#3 2014-06-01 21:32:52

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: How to create a virtual ethernet interface in arch ?

I think a VLAN may be what you want, see https://wiki.archlinux.org/index.php/VLAN

Offline

Board footer

Powered by FluxBB