Questions tagged [iproute2]

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

The ip command is meant to replace ifconfig/route commands on Linux. This command lets you perform advanced configurations that were not possible with ifconfig/route.

See:

242 questions
0
votes
0 answers

iproute2 with second gateway not working with docker-container of mailcow

im currently setting up an mailcow instance. My plan is to give the server a public ip-address alongside with an internal ip-address. The mailserver itself should use the public-address while the webinterface should be only accessable via the…
0
votes
0 answers

How can I set up a transparent proxy (TPROXY type) across network namespaces?

I want to setup a transparent proxy across network namespaces. I have two network namespaces, "nsx" and "nsy", each one has a veth pair, the pair of "nsx" is pointed to the host, the pair of "nsy" is pointed to "nsx", in the following scheme…
0
votes
1 answer

Why "vlan: 3 parent interface: en0"

I have created a VLAN: Linux vconfig add en0 3 ip addr add 192.168.126.5/24 dev en0.3 ip link set up en0.3 can be translated to macOS by e.g. MacOS ifconfig vlan0 create ifconfig vlan0 vlan 3 vlandev en0 ifconfig vlan0 inet 192.168.126.5 netmask…
Chris G.
  • 207
  • 1
  • 9
0
votes
1 answer

List "hardware" Network Interfaces Controllers

When using ifconfig or ip link show commands, it lists not only hardware interfaces, but also software interfaces - I would expect only the physically interfaces? Note: I am running on MacOS. ip link show lo0:…
Chris G.
  • 207
  • 1
  • 9
0
votes
0 answers

Wireguard networking issues

I'm having some wireguard networking issues and hope you guys can help me. My goal is to build a side to side vpn. For that I have host A (public) and host B (private). Below is my config to create the tunnel. So far I can ping from each side to the…
Andreas
  • 1
  • 1
0
votes
1 answer

Redirect specific traffic through a VPN interface

I, I would like to redirect specific ports through a specific interface. Until now what I accomplished it was cat /etc/iproute2/rt_tables | grep "200 force.route" > /dev/null if [ $? != 0 ]; then echo "200 force.route" >>…
0
votes
1 answer

Send response back through same device for connections coming in through Wireguard

I have a server lanserver running in my private LAN that is connected to a public server publicserver using Wireguard. publicserver forwards TCP connections to certain ports to lanserver through the Wireguard connection using an iptables DNAT…
cdauth
  • 941
  • 1
  • 10
  • 19
0
votes
1 answer

Unable to use fwmark on Debian 11 (bulleyes) to change routing behavior

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 interfaces connected to some ISP's Box: eth1 for ISP1…
dominix
  • 446
  • 2
  • 4
  • 13
0
votes
1 answer

Force new process to use the specific network interface (using netns/network namespaces)

I have a number of interfaces available on Ubuntu 20.04 machine. Among others enx0c5b8f279a64 and usb0 with the later being used as the default one. I want to make sure that a particular process started in terminal will use only one of these…
Kira
  • 11
  • 4
0
votes
1 answer

Ubuntu server as both a private NAT router and a public router

I am attempting to do something I've never tried before. I have a Dell PowerEdge 540 that I've installed Ubuntu on. I got a Comcast Business line installed, and have the following physical network configuration: Ubuntu Server 20.04.3 LTS enp10s0f0:…
JimmyP624
  • 23
  • 2
0
votes
0 answers

How to mark and separate connections?

I have a issabel Linux (based on Centos 7) with 3 ethernet, and I want this scenario: eth0 with IP 172.16.3.30/16 ----gw(172.16.0.1)----> (I want to use as Default Gateway) eth1 with IP 10.1.5.102/30 -----gw(10.1.5.101)----> (mark connections to…
0
votes
1 answer

How to switch linux interface to trunk-only mode?

I'm trying to configure linux interface into trunk-only mode, that means 'accept only vlan-tagged traffic', and most importantly, ignore all untagged traffic. I'm pretty successful at having tagged traffic to work (ip link add type vlan works…
George Shuklin
  • 296
  • 2
  • 11
0
votes
1 answer

how to mark connections to route multiple gateways?

hi i am having trouble setting up permanent routes for my network interfaces, i have : os : linux (centos 7) eth0 : IP 172.16.3.6 -- Gateway : 172.16.0.1 eth0:1 : IP 10.1.5.102 -- Gateway : 10.1.5.101 eth0:2 : IP 10.1.5.106 -- Gateway :…
0
votes
1 answer

How to add a routing rule that only match "dport"?

In my OpenWrt box, I want to route only a specific protocol(tcp:1888) to a tun interface only for one PC(192.168.28.2), so I do as following: ip rule add from 192.168.28.2 dport 1888 lookup 123 ip route add default via 10.8.0.2 dev tun0 table…
Leon
  • 169
  • 9
0
votes
1 answer

Within a gateway node how to route traffic to the outside world via a specific interface consistently?

I have linux ec2 instances with two nics (eth0 and eth2). Both the nics have public ip's attached to it and are able to get out to the internet. This linux instance is acting as a gateway node for me, forwarding traffic from ec2 in private subnets…