Questions tagged [routing]

the process by which data packets on communication networks are forwarded into the direction of their ultimate destination by routers.

Filter by
Sorted by
Tagged with
91 votes
8 answers
94k views

What is "anycast" and how is it helpful?

I'd never heard of anycast until a few seconds ago when I read "What are some cool or useful server/networking tricks?". The wikipedia "Anycast" article on it is quite formal and doesn't really evoke ...
username's user avatar
  • 4,785
122 votes
2 answers
411k views

Can I have multiple DHCP servers on one network?

This is a Canonical Question about Redundant DHCP Servers. Is it possible to have more than one DHCP server on the same LAN? What are the implications of doing this? What happens if there is more ...
Rob Moir's user avatar
  • 32k
16 votes
3 answers
10k views

IPv6: differences between "routed prefix" and "link prefix"?

What are the exact differences between "routed prefix" and "link prefix" for IPv6?How do these differences in a wireshark-Trace? (if you observe a Host with an assigned "routed prefix" or a Host with ...
Erik's user avatar
  • 171
32 votes
5 answers
118k views

iptables - Target to route packet to specific interface?

My home server has two main interfaces, eth1 (a standard internet connection) and tun0 (an OpenVPN tunnel). I'd like to use iptables to force all packets generated by a local process owned by UID ...
Ethan's user avatar
  • 527
24 votes
6 answers
31k views

Prevent SSH connection lost after logging into VPN on server machine

I encountered an issue that I can't deal with. When I'm logged onto an VPS over SSH and try to estabilish VPN connection on that VPS, the SSH connection between VPS and my machine get lost. I assume ...
mic22's user avatar
  • 341
17 votes
3 answers
59k views

How to Set Up Linux Server As A Router with NAT

We have a simple router which has NAT of symmetric type, but because this router doesn't provide us with any debugging interface, we cannot figure out if a specific packet reaches the NAT or not. ...
Steve Peng's user avatar
9 votes
4 answers
4k views

Multi-WAN bonding across different media

I've recently been thinking again about a product that Viprinet provide, basically they've got a pair of routers, one that lives in a datacentre, Their VPN Multichannel Hub and the on-site hardware, ...
Tom O'Connor's user avatar
  • 27.6k
0 votes
1 answer
1k views

Ghost ping on a multi-NIC Linux system

I have a Linux system with 3 NICs & all 3 are on the same subnet. I've setup policy routing on the system with ip rules & ip routes using 3 tables. These are the IPs of the 3 NICs. ETH0: 192....
Sunny Yates's user avatar
39 votes
5 answers
365k views

How to route different traffic thru different network interfaces (in Windows)

I've searched for details on how to do this but I've been unsuccessful - I wondered if someone could offer up some advice. So, let's say I have 2 network cards (LAN and 3G in my instance), both ...
user avatar
8 votes
3 answers
84k views

Routing between two networks on linux?

I got stuck with one problem I cant find solution. I have linux pc with two NIC. first nic (eth1) is connected to public ip (probably switch or whatever, doesnt really mater) so eth1 is connected to ...
gorgi93's user avatar
  • 193
122 votes
4 answers
230k views

What is the difference between unicast, anycast, broadcast and multicast traffic?

I have never had the privilege of working in an environment that required complicated routing or if it did require it, it was handled upstream of me. I've always used very simple static routing ...
user avatar
19 votes
6 answers
43k views

Specifing ip address for outbound connections on a multi ip host

one of my servers (Debian 5.0.6) has two public ip-address on the same interface. This used to work well for months but suddenly it is using "the wrong" ip addresses for outgoing connections. This is ...
Hendrik Brummermann's user avatar
16 votes
2 answers
90k views

Use ip route add to add multicast routes to multiple interfaces

TLDR: Is there a way to use "ip route" to add multicast routes for multiple NICs? We have software that uses two multicast groups to communicate with two different groups of devices on two separate ...
gnac's user avatar
  • 263
8 votes
2 answers
16k views

Can't ping multihomed Linux machine on non-default interface

I have a multihomed Ubuntu server with a set of interfaces that includes: eth2: 10.10.0.131/24 eth3: 10.20.0.2/24 The default interface is eth2, with a gateway of 10.10.0.1. Here's what the routing ...
Lorin Hochstein's user avatar
6 votes
3 answers
38k views

How to set up two default routes in linux

TL;DR How to set up two default routes in linux (corresponding to two interfaces), such that incoming traffic from both interfaces is accepted. Scenario I have a host having two NICs eth0 and eth1....
Tanmay's user avatar
  • 225
6 votes
3 answers
25k views

Delete specific conntrack entries?

in a multi-ISP configuration, I'm routing and NATing specific traffic, e.g. VoIP, through specific interface - to a distinct provider. When one of the interfaces (or routes) becomes unavailable, all ...
Zrin's user avatar
  • 607
1 vote
1 answer
4k views

iptables PREROUTING not in effect

We are running a ubuntu 20.04 in AWS. We are trying to set up an iptables rule so any MySQL traffic with a dummy IP address will be forwarded to the MySql database at 172.31.6.173 in the same VPC. Let ...
Cal's user avatar
  • 189
1 vote
1 answer
5k views

Ping does not work on TAP interfaces with bridge

I am trying to understand the linux bridging and local ip rules, I have following topology on my linux laptop. br0 ___________|__________ | | |tap0 ...
Haswell's user avatar
  • 113
33 votes
3 answers
24k views

Tuning Linux IP routing parameters -- secret_interval and tcp_mem

We had a little failover problem with one of our HAProxy VMs today. When we dug into it, we found this: Jan 26 07:41:45 haproxy2 kernel: [226818.070059] __ratelimit: 10 callbacks suppressed Jan 26 07:...
Jeff Atwood's user avatar
  • 13.2k
26 votes
1 answer
120k views

Two network interfaces and two IP addresses on the same subnet in Linux

I recently ran into a situation where I needed two IP addresses on the same subnet assigned to one Linux host so that we could run two SSL/TLS sites. My first approach was to use IP aliasing, e.g. ...
Scott Duckworth's user avatar
23 votes
2 answers
49k views

Routing selection: specificity vs metric

I understand that Linux chooses the most specific route to the destination when it does routing selection. But what about a route's metric? Does it have a higher priority than route's specificity? A ...
Eugene Yarmash's user avatar
22 votes
3 answers
63k views

Difference beetween DNAT and REDIRECT in IPTABLES

Okay, it may be because I am dense or maybe just not finding the right source, but I can't understand why one of these IPTABLES setups would be better than the other. Here is my setup: I have a box ...
QWade's user avatar
  • 927
15 votes
1 answer
41k views

Disabling rp_filter on one interface

I have an Ubuntu 16.04 Server which is acting as a router with multiple (VLAN) interfaces. By default, rp_filter (reverse path filtering) is enabled for all interfaces. I want to keep it that way, but ...
Cybran's user avatar
  • 422
9 votes
4 answers
25k views

systemd-networkd and direct routes

I have problem adding direct routes through systemd-networkd. What I'm trying to achieve is similar to: ip a a 192.168.0.2/32 dev enp0s3 ip r a 192.168.0.1/32 dev enp0s3 ip r a default via 192.168.0....
Ineu's user avatar
  • 280
9 votes
3 answers
25k views

Bypass openvpn for particular ip

My desktop machine runs Trisquel GNU/Linux 6.0 (which is basically a libre version of Ubuntu 12.04), and I use OpenVPN to connect to a commercial VPN provider for internet access. It currently routes ...
Lloyd Smart's user avatar
9 votes
8 answers
15k views

Force Juniper-network client to use split routing

I'm using the Juniper client for OSX ('Network Connect') to access a client's VPN. It appears that the client is configured to not use split-routing. The client's VPN host is not willing to enable ...
craibuc's user avatar
  • 467
7 votes
1 answer
41k views

OpenVPN server cannot ping clients

I have OpenVPN set up on a Debian server. Clients can connect, and clients can ping and access resources (Samba shares and intranet) on the server. However, the server cannot ping the client - it ...
artfulrobot's user avatar
  • 3,129
7 votes
2 answers
14k views

TCP/IP routing: accessing a LAN device with wrong static IP configuration

I forgot to change the static IP of a network device before moving it from my datacenter network to my home LAN. Since it isn't configured properly for my LAN network, I'm not sure how to access it. ...
Michael McDonald's user avatar
6 votes
3 answers
5k views

Round Robin Default Gateways on Linux

Does Linux have native support for load balanced (maybe as simple as RR or IP Hash) multiple default gateways?
Kyle Brandt's user avatar
  • 84.4k
6 votes
1 answer
24k views

How to set mark on packet when forwarding it in nat prerouting table?

I have a few port forward rules like this iptables -t nat -A PREROUTING -p tcp --dport 46000 -j DNAT --to-destination 172.16.8.2:46000 iptables -A FORWARD -p tcp -d 172.16.8.2 --dport 46000 -j ACCEPT ...
Poma's user avatar
  • 1,309
5 votes
1 answer
5k views

OS X 10.8: redirecting locally initiated ssh connections to localhost:22

I need to hack the OS X pf to redirect all ssh connections from an user to this machine. I want, when doing $ ssh google.com to get the same results as with $ ssh localhost ie a connection to my ...
foxx1337's user avatar
  • 169
5 votes
2 answers
21k views

iptables packet forwarding to one of two gateways depending on origin

Given the following installation: old router 192.168.1.1 with NAT forward of tcp port 80 to 192.168.1.10:80 new router 192.168.1.2 with NAT forward of tcp port 80 to 192.168.1.10:80 web ...
Daniel Alder's user avatar
5 votes
10 answers
24k views

Forward port to another Ip/port

I recently found out that my ISP disables port 135. I have a server and personal computer behind my router. A friend and I are working on a programming project and are running into some sql issues ...
user avatar
5 votes
1 answer
14k views

Why is Linux choosing the wrong source ip address

and what to do to let it choose the right one? This all happens inside an OpenVZ container: The Host is Debian/Wheezy with Redhat/OpenVZ Kernel: root@mycl2:~# uname -a Linux mycl2 2.6.32-openvz-...
Scheintod's user avatar
  • 401
4 votes
3 answers
2k views

two gateways / two providers with different ips

I want to route packets coming in on eth0 back over eth0 and the ones coming in to eth1 back over eth1. I don't care which gateway is used for outgoing connections. If i just enter two gateways in /...
Jure1873's user avatar
  • 3,732
4 votes
3 answers
40k views

Routing decision when there are two default gateways on windows

My windows machine has two network cards, both have default gateways. How does windows determine which gateway should it access when sending a packet to a remote endpoint? More precisely, here's my ...
user avatar
3 votes
2 answers
12k views

How to configure routing between Azure virtual networks?

I'm designing an Azure environment which will contain multiple virtual networks, and a requirement is for all networks to be connected; a VM in any network should be able to talk to another VM in any ...
Massimo's user avatar
  • 71.3k
2 votes
2 answers
2k views

BGP Multihomed/Multi-location best practice

We're in the process of designing a new iteration of our network where we improve resilliency by adding a second datacentre. We'll be adding a second datacentre, with an identical configuration of ...
Tom O'Connor's user avatar
  • 27.6k
2 votes
2 answers
14k views

Change source address based on destination IP

We have several "router" machines that gather a lot of external IP addresses on the same host and redirect, NAT or proxy the traffic to the internal network. They also act as routers for the machines ...
hgj's user avatar
  • 85
2 votes
1 answer
1k views

why port forwarding is not working in this setup?

I'm trying to setup a docker virtualization environment. This is a follow up of this question. I have a virtual eth0:0 interface, and I would like to forward it using iptables. The public, main IP ...
Mascarpone's user avatar
1 vote
2 answers
4k views

One linux server, one network, two gateway - can server handle connections coming from both gateways?

We have OpenSUSE server with a service running on it. We have two gateways on the network. One of these gateways is set as a default gateway for the server. In this case server can accept connections ...
QeySee's user avatar
  • 48
1 vote
1 answer
2k views

Prevent routing loop with FwMark in Wireguard

I want to set up a VPN server so that the VPN connection is used only when accessing resources within the server. Normally, I'd do this by using the server's internal IP, but I want to use the domain ...
Asher's user avatar
  • 13
1 vote
1 answer
564 views

How to bypass whitelist based internet censorship

How can we bypass internet censorship in Iran In Iran government blocked internet access to global and we can only access servers that hosted in Iran datacenters. I think they used whitelisting ...
Meendufski's user avatar
1 vote
1 answer
551 views

Routing OpenVPN traffic to IP Tunnel

I'm connecting through OpenVPN to my server1 but don't like to have its IP visible while surfing the web, so I opened an IP tunnel to another server (server2). How can I set the routing and IP Tables ...
Max's user avatar
  • 11
0 votes
2 answers
1k views

Routing traffic for specific port range

I have a Ubiquiti Dream Machine (UDM) which is part of a project that is replacing a network topology with a different one. This involves both Internet traffic and VoIP (Asterisk). During the phased ...
pgr's user avatar
  • 459
0 votes
2 answers
3k views

ip routing for extra eni on RHEL ec2 instances

I have noticed that when one add an additional ENI on an ec2, getting routing to work is so difficult and there is no documentation anywhere to refer to. I do know that if one uses the Amazon Linux ...
uberrebu's user avatar
  • 513
0 votes
1 answer
821 views

Configure routes in OpenVPN

I am trying to figure out how to setup routing on OpenVPN. I have successful connection between client (OS X Snow Leopard) and server (OS X Leopard Server), and each can ping the other. However, I am ...
user avatar
0 votes
1 answer
5k views

Cisco ASA 5505 Voice/Data VLANs not pinging/routing

Hi i am very new to Cisco ASA 5000 series and have two interfaces that i would like to route between, a data network 192.168.69.0/24 and voice 192.168.70.0/24, I have addded both and can ping the ...
morleyc's user avatar
  • 1,150
48 votes
5 answers
65k views

Is there a cloud-based reverse proxy solution in AWS? [closed]

The system I have an API deployed on EC2 machines on AWS. Incoming HTTPS requests are passed to an elastic load balancer. The load balancer handles the SSL, and passes the request to an Nginx server, ...
Adam Matan's user avatar
  • 13.6k
41 votes
3 answers
85k views

Where does the route to 169.254.0.0 comes from?

Running CentOS 5.4 Why do I have route to 169.254.0.0 although it does not appear in Network > Ethernet Device > Route configuration dialog? Destination Gateway Genmask Flags ...
jackhab's user avatar
  • 801

1
2 3 4 5