Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [iproute2]

iproute2 (ip) is a tool used to manipulate network configurations.

1
vote
1answer
25 views

Linux bridge_slave changes automatically to forwarding state

I'm trying to change the state of bridge slaves on Linux brigde system and It has very weird behaviour, changing all the time the port state to forwarding. I.E: Create a bridge with dummy interface ...
0
votes
0answers
34 views

add route table and vlan failed

I'm trying to add two route tables with two virtual Nics, I did the following steps: 1, Added two lines in the file /etc/iproute2/rt_tables 126 net_test_1 127 net_test_2 2, Created two Ip ...
0
votes
0answers
16 views

Docker container routing issue with multi nic host

I'm running docker (v 18) on Debian buster on a setup where the server has 2 NIC connected. I'v a bridge setup on each of the 2 NIC (vlan interfaces) and each bridge has an IP assigned within a /24: ...
0
votes
0answers
9 views

iptables: Marked packets not routed via configured route

I need to configure a firewall server with two internet lines (A on eth1, B on eth0) and an internal network (C on eth2). Additionally to the default routing table (via A / eth1), I have two routing ...
-1
votes
1answer
68 views

How to understand this output of ip route list table 255 [closed]

broadcast 100.125.71.152 dev rmnet_data1 proto kernel scope link src 100.125.71.153 local 100.125.71.153 dev rmnet_data1 proto kernel scope host src 100.125.71.153 broadcast 100.125.71.155 dev ...
0
votes
0answers
123 views

How to multiple incoming from interface[s]

I have 3 interface(2 wan, 1 local) and enabled forward, but only one incoming interface(ppp0) can to local destination, the following is my iptable command: iptables -t nat -A PREROUTING -i ppp0 -p ...
0
votes
0answers
49 views

How can I add (not replace!) a default route upon OpenVPN connection?

When I run sudo openvpn foo.conf I do not yet have a default gateway defined. Once the connection is established, I run sudo ip route add default via X.X.X.X, where X.X.X.X is the local IP of the ...
-1
votes
1answer
36 views

Linux route policy based on tos returning wrong gateway

I have a simulated ad-hoc network running on Docker, using Ubuntu 16.04 as a base. I have a number of routing tables. The table in question, table 102, appears as: root@b22e0eafe06d:~# ip route show ...
1
vote
0answers
75 views

iproute2 routing through multiple networks with rt_tables

This question is similar to many others I've consulted while seeking an answer, both on ServerFault and elsewhere, but I'm stuck because as far as I can see I've set this up correctly but I'm have no ...
0
votes
1answer
236 views

“ip rule to” works but “ip rule fwmark” fails - why?

I have a CentOS 6 (kernel 2.6.32) router with working OpenVPN client on it, and I want to redirect some traffic via VPN server. Client (192.168.60.159) sends request to router (192.168.60.6:1443), ...
0
votes
3answers
197 views

How to know a virtual NIC's type on Linux?

On a Linux box, I see there exists a lot of virtual NIC's. If I want to know what's the link type when created them using 'ip link add ... type ...', what do I do? Thanks, woody
1
vote
0answers
345 views

Route QEMU VM traffic through hosts VPN

tl;dr Host connects via VPN to the internet and a VM on this host doesn't go through this VPN (but it should). I think the network config isn't quite correct. The host The host (arch Linux) connects ...
0
votes
1answer
222 views

dump all routes of all tables with iproute2

I want to save all routes of all routing tables. I have this script: #!/bin/bash DUMP=dump.log for i in `seq 0 255`; do routes="`ip route show table ${i}`" if [ ! -z "${routes}" ];then ...
0
votes
0answers
206 views

Physical interface MAC send an ARP reply instead of the virtual

I have a similiar problem as described here. I want to achieve, that my virtual interface does a arp response and the other hosts on the subnet have the virtual mac address in their arp cache, not the ...
0
votes
0answers
153 views

Config tool way to configure DHCP client identifier (e.g. iproute2)

I'm trying to write a general solution to adding and removing DHCP client identifiers/network aliases - current implementation is for Ubuntu 16.04, but I want to be ready to move servers either to ...
0
votes
1answer
2k views

Not able to add static IP with Netplan on Ubuntu 18.04

so I have the following problem. There is dedicated Ubuntu 18.04 host, that is supposed to be assigned a static ip address. There are two interfaces, eth0 and eth1. eth0 ist getting its address via ...
0
votes
1answer
144 views

How do I load balance outgoing connections with iptables and iproute2?

I have a server behind two public facing gateways INTERNET | | GW1 GW2 | | SERVER GW1's IP is 192.168.w.x, MAC aa:bb:cc:dd:ee:ff GW2's IP is 192.168.y.z, MAC ff:ee:dd:cc:bb:aa # note: w != y ...
0
votes
1answer
229 views

ip route and rule on boot

I'm trying to have the following rule and route added automaticaly on boot. Adding them manually make things work. I'm running CentOS. ip rule add from 10.1.10.10/10 dev my-tun table my-table ip ...
1
vote
0answers
81 views

Setting up classless static routes manually in GCE

In GCE, the DHCP server return the IP address with mask of 32 bits. Making the instance the only one in its subnet. It also return couple of static routes (RFC3442) that need to be configured. Example ...
0
votes
1answer
675 views

Where to save ip rule, ip route and iptables commands on Debian Stretch?

To make an SSH server work properly while still maintaining an OpenVPN connection, I have a small mixture of ip-related commands I need to persist and run on startup on a Debian Stretch (actually ...
2
votes
2answers
315 views

Secondary IP in its own netns namespace

Is there a way I can move a secondary IP into its own namespace while keeping the primary IP on the original device? If I have 10.0.0.1 and 10.0.0.2 on device eth0, but I want 10.0.0.2 to be in its ...
2
votes
1answer
623 views

iproute2 interface statistics seem wrong

For some reason, ip -s link does not show the same numbers as /proc/net/dev, specifically the overrun count. For a given interface, ip shows no overrun packets: $ ip -s link show eth-ext1 7: eth-...
0
votes
0answers
273 views

Packets routed through wrong interface

This is a follow up on ip rule shouldn't beat ip route. I've configured everything as per my last question. But... Running: $ ip route get 10.10.10.10 from 10.0.0.13 iif test-interface 10.10.10....
1
vote
0answers
404 views

Bidirectional NAT with iptables

In short, I have a cluster system at my hands, for which I have to route traffic through its master. Routing traffic from the nodes to the outside world works, but routing traffic from our department'...
0
votes
0answers
38 views

Mystery persistent /8 on routing table

I have the below route listed, that is persistent over restarts. "route -n" 69.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0 and "ip route" 69.0.0.0/8 dev eth0 proto ...
0
votes
0answers
2k views

how to add multiple default routes ubuntu 16.04 lts

I have the following commands and outputs Here are my current commands (this work fine on RHEL system but not on ubuntu) ip route add default via 10.1.1.1 dev eth0 tab 1 ip route add default via 10.1....
0
votes
1answer
408 views

Linux routes for point-to-point Ethernet network in presence of a default route

SOLUTION: There's a typo in the IP address on my laptop Ethernet interface (see the accepted answer). The following writeup is most probably proper setup. I'd like to communicate with Raspberry Pi (...
1
vote
1answer
171 views

iproute2 mark vs manual rule in table

I have a problem! So, I have two providers and a routing server on CentOS7. I can not get the marking to work through the second provider. The essence is this: With the first provider everything is ...
0
votes
2answers
52 views

Split access from multiple uplinks

Our setting is as follows: +---------+ +------------+ / | | | Modem | / +------...
0
votes
2answers
61 views

Why is the order of routing commands important in this case?

Why is the result different between this ip tuntap add dev tun1 mode tun ip link set up tun1 ip route add 1.2.3.4 via 192.168.0.1 dev eth0 ip addr add 10.0.0.1 peer 1.2.3.4 dev tun1 and this (last ...
0
votes
1answer
389 views

does the src field in an ip route entry have any effect on forwarding traffic?

does the src field in ip route have any affect on forwarding traffic? or is it only significant for output traffic? what is the significance of an ip route entry that specifies both dev and src, ...
0
votes
2answers
121 views

router's ip on subnet1 conflicts with identical host ip on subnet2

i'm trying to setup a linux machine as router for the following subnets: +--------------------------------------------+ host3 ...
0
votes
1answer
72 views

IP routing table with non unique ID?

Is it possible to have multiple routing tables with the same ID? the name of the table would still be unique. I cant find the information about this, seems is focusing on ip rule and add addr to the ...
-1
votes
2answers
624 views

Debian - Dual WAN - Static Route on a DHCP Interface

I've got two WAN interfaces coming into a Debian 8 VM. WAN 1 - All Internet and local traffic. (0.0.0.0/0) Has a a static IP, thus IP, netmask and gateway are fixed values. WAN 2 - Specific private ...
0
votes
1answer
81 views

Linux IP-tables Forwarding loose Source IP on access.log [closed]

Team, We have configured IP tables with forwarding request coming on eth1(public IP x.x.x.x) interface to other server. We are able to forward all requests but problem is loosing origin public IP(...
0
votes
1answer
364 views

Routing issue with iproute2, two gateways and two network interfaces

I am trying to setup a layer 3 iptables firewall, with two interfaces. My firewall has two physical interfaces : eno0, connected to my ISP's gateway, and eno1, connected to my local network gateway. ...
0
votes
2answers
602 views

Does each custom routing table (w/default gateway) need a link scope route?

My Centos machine has a custom routing table foo_table containing just a default gateway route: # ip route add default via 10.0.2.1 table foo_table # ip route show table foo_table default via 10.0....
0
votes
0answers
40 views

SSH needs to go though different interface other than VPN

Im hoping someone can point me in the right direction. I have a ubuntu 16 server which connects to an OpenVPN server at boot, the config file it pulls routes all traffic though the VPN connection - ...
1
vote
1answer
309 views

IPTables Multi-VLAN NAT to Multiple IPs

I have a slight Problem with my NAT-Setup. What I'm trying to do: I have 2 VLANs (in this example 100 and 200) and want that they can access the Network via separate IPs. This should be accomplished ...
0
votes
0answers
145 views

Multi WAN ipv4 forward Ubuntu

I want to setup a dual ethernet ubuntu machine as Multi-WAN load-balance router with ipv4 forwarding and NAT for my internal network. I searched for some days now, but only found some tutorials how ...
0
votes
1answer
378 views

create vpn tunnel at exist interface

guys. I'm testing our company's firewall product.And there have a problem bothers me. "The firewall" works as bridge mode have eth1 interface.I want to simulate a client remote access "the firewall" ...
2
votes
0answers
64 views

What is “send bps” value in ss --info output?

If run ss --info, there is a send #bps in the output. I've found out that it's value is about twice bigger than real data flow speed. From ss's source code, send_bps is: s.send_bps = (double) info-&...
3
votes
2answers
4k views

What is the local routing table used for?

I am trying to understand what is the local routing table. If I add a random address in it with the following command: sudo ip route add to local <any-ip-address> dev <network interface> ...
1
vote
2answers
2k views

systemd-networkd equivilent of “ip rule add…”

Basically the title says it all, what would be the equivalent to ip rule add from 10.10.0.10/32 table 2 ip rule add to 10.10.0.10/32 table 2 in systemd-networkd? I tried to setup something like [...
0
votes
1answer
410 views

How to add ip route to route traffic through interface when destination is also that interface

I have been testing keepalived and preparing to roll out on my vps. My setup is: (...) 2: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 ...
0
votes
1answer
996 views

Properly manage iptables rules on Docker host

I am using Gentoo and Docker. I have bunch of own iptables rules, and keep them in /var/lib/iptables/rules-save. Docker adding bunch of own rules when start. It seems that iptables is auto-saving ...
1
vote
1answer
122 views

How to route traffic destined for a port to an IP without altering the destination IP using iptables/iproute2?

I have to collect data from a number (>1000) of devices whose only authentication/authorization is via the source IP address connecting to them. These are network devices whose configuration is ...
2
votes
1answer
234 views

How to create a protocol-based default route using iproute2

I'm trying to create two routes -- Send all packets with IP protocol version 100 to 1.1.1.1 (via device eth1) Send all other IP packets to 2.2.2.2 (via device eth2) Reviewing the man pages of ip-...
0
votes
0answers
243 views

Ubuntu 16.10: source based routing: packets are not redirected

I'm trying to configure source based routing on my ubuntu-machine. As simplest example I'm trying to configure the only one interface on my machine. All configuration taken from here: https://www....
1
vote
1answer
1k views

unable to install source route - RTNETLINK answers: No such process (IPsec / strongswan)

Basically I'm trying to connect a pfSense to an EdgeRouter via IPsec site2site. (public ip networks obfuscated by '1.2.') [pfsense] <-> [edgerouter] public: 1.2.156.229/30 <-&...