Interface not created until first L2TP session established.

L2TP related questions
Post Reply
tj-19
Posts: 21
Joined: 10 Jun 2019, 20:42

Interface not created until first L2TP session established.

Post by tj-19 » 10 Jan 2022, 17:19

I would like to setup various rules to disable connection tracking for the l2tp interface.

Normally I would do this by the interface name.

However, in ACCEL-PPP the interface is not created until the first session comes in.

I’ve set ifname=l2tp0%d to l2tp0 to make all interfaces l2tp0.

I then want to set:-
iptables -t raw -I PREROUTING -i l2tp0 -j CT --notrack
iptables -t raw -I OUTPUT -o l2tp0 -j CT –notrack

However, if I type:- ip route

I can see:- ‘default dev l2tp0 scope link metric 1’ does not exist before the first session comes in.

I know I can disable connection tracking via IP ranges, but this will create extra work.

Any ideas?

dimka88
Posts: 802
Joined: 13 Oct 2014, 05:51
Contact:

Re: Interface not created until first L2TP session established.

Post by dimka88 » 10 Jan 2022, 19:51

Hi @tj-19, why you can not use + char in this case?

Code: Select all

iptables -t raw -I PREROUTING -i l2tp+ -j CT --notrack
iptables -t raw -I OUTPUT -o l2tp+ -j CT –notrack
ifname=l2tp0%d this said that you will have l2tp00, l2tp01 ...
Also, does not possible to have the same name for the second interface

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest