Questions tagged [iproute]
Questions that include employing tools of the IPROUTE2 Utility Suite, especially ip and tc.
288
questions
0
votes
0
answers
20
views
Can't add secondary gateway for secondary interface in Ubuntu 22.04
I have two interfaces and both of them have a public IP address. One of them (eth0) is primary and the other one (eth1) is secondary. I'm trying to setup it through netplan + iproute2. When I was on ...
0
votes
1
answer
18
views
docker bridge can't reach external address defined as `route via`
I have 3 raspberry pi in a daisy-chain network, with ip routes and iptables accept fwd - all three hosts can reach each others:
A <--> B <--> C
However a container from docker-compose ...
2
votes
1
answer
30
views
Can't ping devices on LAN
I've got 2 Access Points attached to my laptop's ethernet port via a PoE switch. I've assigned static IPs & names to them with dnxmasq (successfully, I believe). However, ping and ssh say they're ...
0
votes
1
answer
71
views
Understanding the use of 'src' attribute in Linux routing tables
I have a question about a route table in linux which “ip route show” command displays.
I understand what “src” attribute is like based on this link.
http://linux-ip.net/html/routing-saddr-selection....
0
votes
1
answer
70
views
Route traffic from one IP address through a different interface
I have a local and a remote network. My local network has a router, ubuntu box and TV. The remote network has a router and a raspberry pi. The local ubuntu box and remote raspberry pi are connected ...
1
vote
0
answers
112
views
Remove default route on AlmaLinux 9 / RH9
I'm running AlmaLinux 9 (a red hat 9 clone), and I would like to permanently remove a default route. My routing table is shown below, and I would like to remove the 172.31.252.1 route.
I know how to ...
0
votes
0
answers
21
views
Iproute2 Bridge With Netem and TC
I have a transmitter and a receiver who are supposed to send packets between them in multicast mode. I want to stress the receiver using netem and tc. My setup is as follows: the TX is connected to ...
0
votes
0
answers
15
views
How to tell whether a given packet is subject to IPsec's SPD?
My IPsec configuration via strongSwan is non-device and uses XFRM policies / states.
On the VPN gateway I'm trying to test whether a given IP packet (described as src IP, src dev, dst IP) will be ...
0
votes
0
answers
26
views
Why do my TCP connections fail when UDP/ICMP work with policy routing setup?
I have a very nasty problem where I cannot wrap my head around. My goal is to separate my main routing table from the default gateway by putting the default gateway in a separate table (so I can later ...
2
votes
1
answer
181
views
In which order is routing of packets defined if VRF and ip rules are defined?
On a system are VRFs, multiple routing tables and rules defined. A local service (SSH) is not reachable via one interface (WAN interface that is in a VRF) while it is reachable from other interfaces. ...
0
votes
0
answers
18
views
Routing internet traffic via the vpn interface
I have a wifi dongle where I have three interfaces wlan0 (default route), uvpn0(VPN interface) and usb0(interface between the host machine and the dongle).
usb0 Link encap:Ethernet HWaddr DA:CE:...
1
vote
1
answer
80
views
Macvtap connectivity lost after a few hours?
I setup a macvtap interface like this:
ip link add link eth0 vlan type macvlan mode bridge
ip address add 10.0.0.17 dev vlan
ip link set dev vlan up
ip route flush dev eth0
ip route flush dev vlan
ip ...
0
votes
0
answers
123
views
Specifiy which SPI interface to use for SocketCAN interface
I am using a Raspberry Pi 4b with Raspberry Pi OS (kernel 5.15) and a custom CAN HAT with 3xMCP2517FD CAN controllers connected to SPI0/1/4 of the Raspberry Pi to communicate to other CAN nodes on ...
0
votes
0
answers
191
views
Tunneling traffic from socks5 proxy to VPN tun
I have the following setup:
______________________________
| |
| Client |
...
1
vote
1
answer
720
views
What is the difference between using Linux VRF, network namespaces and using different routing tables?
The ip-vrf manual reads :
A VRF provides traffic isolation at layer 3 for routing, similar to how a VLAN is used to isolate traffic at layer 2. Fundamentally, a VRF is a separate routing table.
At ...
0
votes
0
answers
15
views
IP rule for Metal LB not used
I try to implement source-based routing on my Kubernetes cluster.
It works for everything, except the interfaces "generated" by Metal LB.
The physical interface on my machine is 172.16.1.253,...
0
votes
0
answers
160
views
Assistance routing external incoming traffic to interface
I need assistance creating a ip route that forces traffic coming into my VPS's public IP on port 27016 or 3202 to my Wireguard VPN tunnel.
For context, I created this VPS to allow me to expose my ...
0
votes
0
answers
193
views
Wireguard mesh with star-shaped failover
I'm currently trying to convert my star-shaped wireguard setup into a mesh-based one with a single server as a fallback node if the direct routes are not reachable. The goal is to reduce latency and ...
1
vote
1
answer
60
views
Ip routing Linux subnet to an external IP
Good morning
I have a scenario where an application makes a request to service A on IP 10.244.5.0 which is not really in use. The goal is to send all request of a subnet (where the service A IP is ...
2
votes
1
answer
176
views
How do I get the interface name created with `ip tuntap add mode tap`
I want to create a tap with sudo, and then attach the user space program (ssh) to it.
I don't want to hard code the interface name, as multiple users will be using it, so I want the interface name to ...
2
votes
1
answer
1k
views
Manage two network interfaces on RHEL 8
I'am looking to set up a configuration on a dual network RHEL8 enterprise machine hosting web services (web server, APIs, gitlab...). The machine has two network interfaces : eno1 for the local ...
0
votes
1
answer
745
views
Route all traffic from one interface (default gateway) through OpenVPN / tun0 - policy based routing, dependent on source address/interface
I have a Debian Linux VPN router myvpnserver with 2 interfaces, eno1 and eno2:
eno1 is connected to a LAN and an internet router. On this interface with static IP address, myvpnserver has its default ...
0
votes
0
answers
46
views
Route OPENVPN through the L2TP Client [LINUX]
i have 2 servers with 2 diffrent public ip
my configs are
Server 1 Linux Server [Public IP =142.130.108.221]
Server 2 linux server [Public IP =192.130.140.169]
Mobile OPENVPN Client
Server 1 , created ...
3
votes
0
answers
62
views
What exactly is the `/etc/net` project?
I was reading about iproute2 here and I saw the following sentence:
The /etc/net project aims to support most modern network technologies, as it doesn't use ifconfig and allows a system administrator ...
1
vote
0
answers
1k
views
multicast to all interfaces (how to set up the routes?)
I want a host to send out multicast traffic to all interfaces, but it seems I can only have one route.
I tried ip route add 224/4 dev eth0, and then ip route add 224/4 dev sit1, but the second one was ...
1
vote
0
answers
88
views
Wireguard to endpoint Inside a Namespace
I have three VM's. VM-A,VM-B & VM-X. I have a application running on the backend server VM-X. VM-A is the Main frontend server which has high capacity. VM-B is just a standby server of low ...
2
votes
1
answer
6k
views
How to route all traffic from a specific interface to a specific gateway instead of default route?
On my machine I have two interfaces: wlan0 (default route) and tun0.
The tun0 interface is just a local network, it's ip range is 172.16.150.0/24, my machine's (machine A) IP address is 172.16.150.1, ...
1
vote
1
answer
744
views
Why is my namespace not detected?
I tried form home,then sudo su -
ip netns exec 5bd337503b01 ip addr show
Cannot open network namespace "5bd337503b01": No such file or directory
pwd shows
/var/run/docker/netns
Why?
1
vote
1
answer
2k
views
How to access LAN behind VPN client from server?
I have a cloud VM running an OpenVPN server
On the other side, I have a Synology NAS inside a private network.
I would like to access the client's LAN (192.168.1.0/24) from the server.
On the server, ...
0
votes
2
answers
9k
views
Persistent static routes on Debian 11
I'm trying to set up a testing lab such as the following:
P.D: Is not Metasploit, but Metasploitable.
I'm running VirtualBox, and the routers are 2 VMs running Debian 11. Each router has 2 interfaces:...
3
votes
1
answer
342
views
Can I change the order of IP addresses in Linux?
I'm running into some networking issues that seem to be related to the order of IP addresses, as displayed in iproute2. This is what it normally looks like:
# ip -4 -o address show dev eth0
2: eth0 ...
1
vote
0
answers
4k
views
Routing problem shows this Error: Nexthop has invalid gateway
I am trying to route some traffic over a VPN (to certain IPs) and other via my normal connection. To do this I am trying to add a static route to make traffic to some IPs bypass the VPN tunnel.
Very ...
0
votes
0
answers
16
views
Issue with adding a route to a sub-network card
I'm trying to add any route to a sub-network card eth0:1. When I'm running "ip route list" then this command prints the saved rule for eth0 not for eth0:1. Why ? How to solve that?
ip route ...
1
vote
1
answer
326
views
How to config static route from two subnets to firewall
Well, one picture for thousand words. 3 private subnets:
+-----+ +-----+
| PC2 | | PC3 |
...
0
votes
1
answer
1k
views
Reply on same interface as incoming, but with dynamic IP addresses
I have a system with two network interfaces, both of which are connected to the internet with different IP addresses. I would like responses to incoming requests to be sent over the same interface ...
2
votes
1
answer
599
views
How to do "ifconfig lo multicast" using IPROUTE2 / ip command
I am trying to figure out how to add the "MULITCAST" parameter to the lo interface using the "ip" command.
I already have a netplan config which adds the multicast route to my lo ...
0
votes
1
answer
64
views
Compare routes between Linux hosts
I have groups of hosts which require specific routes per group.
Every now and again routes are modified, and I would like to write a script which can check for differences between hosts on the same ...
1
vote
1
answer
78
views
Linux picking wrong source IP
I have an EC2 instance running on a k8s cluster. The instance has three three interface cards.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
...
1
vote
1
answer
380
views
Unable to use fwmark on Debian 11 (bulleyes)
I have a recipe I already use on many cases, but this time doesn't works on Debian 11 (kernel 5.10.0-10-amd64)
my setup is basically an internal interface eth0 for a RFC1918 LAN, and two external ...
0
votes
1
answer
138
views
IP routes changing without warning
PROBLEM
I am using ip route to set up routing tables for a network. Everything is working great, but after a short amount of time (minutes) I lose some of my connections. When I look at my ip route, ...
0
votes
0
answers
282
views
How to add route that does not depend on network reachability?
I have a pptp server on Centos with Mikrotik routers connecting to it as clients, and I need to add routes between them to enable LAN-to-LAN communication.
I have /etc/ppp/ip-up.local script like this:...
6
votes
1
answer
613
views
What constraints (if any) are there on network interface names on linux
In https://stackoverflow.com/questions/24932172/what-length-can-a-network-interface-name-have, it was asked how long a network interface name could be (apparently 16 bytes). However, the answers to ...
2
votes
1
answer
734
views
Which interface does a specific IP address will get routed over?
Is there a way to determine which netdev or IP link interface that a given IP address will route over … in bash/shell language?
This is not about what an IP address is, given a network device name.
...
1
vote
1
answer
193
views
virtual gateway iptables
I'm trying to setup kind of simple networking configuration, but I cannot wrap my head around this. My goal is to make LAN clients go via VPN, while having the possibility to reach the server itself. ...
0
votes
0
answers
3k
views
Why does an IPv6 neighbour router status become STALE? How can I avoid it?
I have a VM on a host with bridged networking (hence, with its own MAC address). Both host and VM run CentOS. Their network is managed by simple /etc/sysconfig/network-scripts/ifcfg-enpXsY files. ...
0
votes
1
answer
57
views
Route to network via two different (bridged) interfaces
It is possible to have two different routes to the same destination network via two different interfaces?
I have a network I want to reach: 10.0.0.0/24 from a host with multiple (bridged) interfaces, ...
2
votes
0
answers
3k
views
Mark a packets with iptables in order to make a source ip routing
I have a linux machine, which I use as a gateway and firewall.
The linux machine (GW/FIREWALL) is connected to a device which allow internet connection (Router Aggregator), it has 2 IP addresses 172....
0
votes
2
answers
340
views
Why is there always a way for a packet to find the default route?
I have an interesting problem that I would like to understand more.
This is my following rules list:
# ip rule show
0: from all lookup local
32761: from all to 188.40.122.95 lookup vpn
32762: from ...
0
votes
2
answers
218
views
Can I sort the output of ip address?
I have a router with a few hundred network interfaces (most of which virtual, naturally). That means that the output of
ip a
shows very many lines which makes management and analysis difficult. ...
0
votes
1
answer
107
views
How to add ip rule after dockerd is up?
I want to add an ip rule that involves the docker0 interface. But docker0 does not exist until docker is up. ip rule will fail if docker0 does not exists. I could use a script that repeats until ...