Routing (in IP-based networks) is the process of selecting paths in a network along which to send network traffic.

learn more… | top users | synonyms

13
votes
2answers
9k views

Reply on same interface as incoming?

I have a system with two interfaces. Both interfaces are connected to the internet. One of them is set as the default route; a side effect of this is that if a packet comes in on the non-default-route ...
12
votes
3answers
1k views

Can I limit a user (and their apps) to one network interface?

As the title really. I've actually got two scenarios to apply this: Multiseat Desktop: two network connections both with internet gateways and two accounts doing bandwidth-intensive tasks on each. I ...
9
votes
3answers
5k views

How to find out which interface am I using for connecting to the internet?

I have eth0 and wlan0 according to ifconfig and I can ping google.com. How can I find out (with a normal user, not root) what interface is active, as in, what interface did the ping (or whatever, ping ...
9
votes
3answers
14k views

Output traffic on different interfaces based on destination port

My question is basically the same as Only allow certain outbound traffic on certain interfaces. I have two interfaces eth1 (10.0.0.2) and wlan0 (192.168.0.2). My default route is for eth1. Let's say ...
9
votes
2answers
12k views

Use ssh with a specific network interface

I'm using openconnect to connect to vpn. After entering my credentials, I get this: POST https://domain.name/... Got CONNECT response: HTTP/1.1 200 OK CSTP connected. DPD 30, Keepalive 30 Connected ...
9
votes
2answers
17k views

iptables --set-mark - Route diferent ports through different interfaces

Short story, 3 interfaces, eth0 (LAN), eth1(ADSL), eth2(4G). eth0 -> eth1: Works (ports 80, 443, 4070) eth0 -> eth2: Doesn't happen This is a graphical representation of the idea: Port 80 & ...
8
votes
1answer
1k views

Linux as router with multiple internet providers

Linux as router: I have 3 Internet providers, each with its own modem. Provider1, which is gateway address 192.168.1.1 Connected to linux router eth1/192.168.1.2 Provider2, gateway address ...
8
votes
1answer
1k views

Dual network connection

I have a usb cellular modem and a Home LAN connection on my Ubuntu 10.10 box. Both work independently. I want to know how to have both connected at the same time, and be able to specify which ...
8
votes
1answer
1k views

Change remote host IP address without losing control (Linux)

How can I change a remote host primary IP address without getting disconnected at all (without being in a "no IP addr" state). The matter is poorly discussed on Internet (according to my research). ...
7
votes
2answers
2k views

linux multiple internet connections load balancing with fail handling

I have two ISP connections and need automatic load balancing between them. I also need to handle failed connections (not use one that does not work). First link is a PPTP connection (ppp0), second is ...
6
votes
3answers
4k views

what is the meaning of 0.0.0.0 as a gateway?

Can anyone clarify gateway assignment for me? What is the difference between adding gateway as 0.0.0.0 and assigning a specific ip address as a gateway?
6
votes
2answers
7k views

How to refuse routes that are PUSHed by OpenVPN server?

When I establish an OpenVPN client connection over the Internet to our corporate OpenVPN server, it pushes several static routes. Unfortunately, these routes break some connectivity within my local ...
6
votes
2answers
3k views

How to build a gateway from my Linux OS

I want to configure my Linux so that it will be used as a network router (gateway). Can anybody give me some hints on this? (links are welcome!)
6
votes
2answers
1k views

1:1 NAT with several identical LANs

I want to connect several LANs located on remote buildings. The "central" site have a Linux computer running OpenVPN. Each remote site also run OpenVPN. the central site has a LAN numbered ...
5
votes
4answers
15k views

How to remove all default gateways

I'm running a custom built linux machine, so not all linux commands are available. I execute network related commands, so I need to set a default gateway right before I run my command, then remove ...
5
votes
2answers
594 views

Route and “e” flag

k# route -6 Destination Next Hop Flag Met Ref Use If ::/0 fe80::8001 UGDAe 1024 0 0 eth0 [...] What does flag "e" mean?
5
votes
1answer
683 views

What is the routing behaviour when two or more default routes?

I have two ISP at the time, connected to the same machine. I added both of them in the routing table as default. However, only one connection is used. $ route Kernel IP routing table Destination ...
5
votes
2answers
1k views

Network interface preference

How does Linux determine which network interface to use, when both are connected to the same network? Note that this isn't a question on routing. I'm familiar with how that works. This is if, say, I ...
5
votes
2answers
2k views

Routing for multiple uplinks/providers

I have a PC with two internet connections. The first one is an Ethernet interface to connect to my local network and access internet via my router. The second one use a GSM modem to connect with ppp. ...
5
votes
1answer
126 views

Skip routing via `lo` interface for outgoing packets

Introduction I have following load balancing configuration: 10.0.1.31 - lb 10.0.1.35 - virtual IP 10.0.1.32 - node1 (tomcat + mysql) 10.0.1.33 - node2 (tomcat + mysql) I'm using keepalived which ...
5
votes
3answers
2k views

How can I disable automatic IPv6 neighbor route advertisement on a router?

I work for an ISP that's in the process of making its infrastructure IPv6-ready. Our core routers already have a working setup, but a large portion of our fiber customers are behind a router running ...
4
votes
1answer
7k views

What is kernel ip forwarding?

I have seen on many blogs, using this command to enable IP forwarding while using many network security/sniffing tools on linux echo 1 > /proc/sys/net/ipv4/ip_forward Can anyone explain me in ...
4
votes
3answers
777 views

ssh will sporadically hang temporarily on fast connection

I am using Ubuntu 13.04 on my laptop, connected to my router at home. When working from home, I will ssh into the servers on campus, through a vpn, with X11 forwarding. ssh -X ...
4
votes
2answers
422 views

Why can I reach a different interface's IP address?

I'm wondering about this, and I can't seem to find an explanation on the internet. I have a linux gateway which has multiple interfaces: eth0: external ip eth1: 172.16.1.1/24 eth2: 172.16.2.1/24 ...
4
votes
1answer
4k views

Using the Wifi of a notebook via ethernet for another PC

I want to connect a PC to the internet via my notebook, which is connected to a WLAN. The setup should look like the following scheme: PC (eth0) -> Notebook (eth0) -> Notebook(wlan0) -> ...
4
votes
5answers
9k views

How to route specific adresses through a tunnel?

There are certain websites/services which I can only access from the subnet on which my server is located (think of the typical intranet scenario). Is there a way to transparently route traffic that ...
4
votes
1answer
955 views

Can't ssh to beaglebone?

After I did: route add default gw 192.168.7.1 I also changed /etc/resolv.conf: nameserver 192.168.7.1 in order to share internet between Ubuntu in VMware. I've got internet working but after a ...
4
votes
1answer
156 views

Routing public ipv6 traffic through openvpn tunnel

What I'm trying to do is to route IPv6 traffic through a vpn tunnel. That way, I should be able to use IPv6 in a network that doesn't support IPv6. I have a VPS which has an IPv6 block assigned. Part ...
4
votes
1answer
92 views

Linux routing for receiving packet

Maybe this is a dumb question. I have two NIC and they are in the same subnet. ip route commnad show above. Kernel was build WITHOUT policy routing. My question is: When receiving packet whether ...
4
votes
3answers
1k views

Redirect traffic through vpn on an as needed basis

My problem is really simple yet it sounds complex, but I have zero to none experience with this. I have set up a box using gentoo which has its own semi-static WAN-IP and acts as router for my LAN. I ...
4
votes
1answer
71 views

Send traffic to self over physical network on Ubuntu

I have a dual port ethernet NIC and let's say I have connected both ports in a loop and assigned the following IPs to the 2 ethernet interfaces: eth2 -> 192.168.2.1 eth3 -> 192.168.3.1 I want to ...
4
votes
1answer
256 views

How to set up ssh server with VPN tunnel? (Policy routing for sshd service)

It's difficult to me to explain in words, so I made diagrams. In short, I want this to work: Basically I want to be able to connect from my laptop [A] to my desktop [B] via ssh, and run terminal ...
4
votes
2answers
155 views

Is it possible to set-up a VPN in such a way that I disconnect from the Internet if it goes down?

How can I set-up a VPN so I loose connection to the Internet if it goes down? I use Ubuntu and have used the network-dialog to use a VPN; but if the VPN goes down, it just switches to the non-VPN ...
4
votes
3answers
3k views

Send duplicate packets over two Internet connections

I need to duplicate an RTP stream over two different (non-reliable) Internet connections. On the receiver side, I will probably run a custom program that will use a buffer and rebuild the stream ...
4
votes
2answers
66 views

Port Routing/DNS for individual program

Background Flickr has closed its http api leaving an https only api. My favourite uploader (the official Flickr Uploadr version 2.5 running under wine) is no longer maintained, so this change broke ...
4
votes
1answer
325 views

How to open VPN connection inside other VPN connection under Linux/Ubuntu

Is it possible to have two VPN connections on top of each other under Ubuntu? Scenario: My organization is quite large and has its own large network. Each group inside the organization has its own ...
4
votes
1answer
370 views

Throughput test setup with two local Ethernet interfaces

I'm currently testing the routing performance of a hardware device (DUT - Device Under Test) with the following setup (all addresses start with 192.168.): eth0 (29.2) <---> eth1 (29.1) eth2 ...
4
votes
1answer
2k views

multigateway routing for specific src port

I have two gateway to access internet, somehow I want to load balancing it, so far its working, but some connection or service need persistent gateway IP to be used, so the client should never change ...
4
votes
1answer
107 views

Why is this static route not taking effect?

Original Question I am running Ubuntu and network manager. I have two different interfaces, eth0 and eth1. Network manager has (as far as I can tell) correctly added this manual route: ~$ ip route ...
4
votes
1answer
72 views

putting extra hops into traceroute6 on OpenBSD

I'm running OpenBSD, or maybe FreeBSD. I don't have lots of IPv4 addresses to waste, but who doesn't have a few billion of IPv6 ones? How do I add some extra IPv6 hops to a traceroute6, around pf(4) ...
4
votes
1answer
307 views

Using source routing (LSRR) - any ideas?

What I want to do is conceptually very simple, but I can't find any information or help about how to go about doing this. Basically, I want to configure my networking to use source routing (LSRR). ...
4
votes
1answer
196 views

Looking for elegant iproute2 solution for host w/ 2 interfaces on 2 networks and 3 gateways

I've got a Linux webserver with 192.168.0.2/24 assigned to eth0 and 172.16.0.2/24 assigned to eth1. I must not change this. Here's the routing so far: 172.16.0.0/24 dev eth1 proto kernel scope link ...
3
votes
3answers
2k views

Using bridge utils to connect two computers via Linux

I have been using bridge utils previously to connect my network connected computers to a single interface on my Linux computer. The problem I'm having is when I installed a new Linux (with Slackware) ...
3
votes
1answer
52 views

Redirect ALL packets from eth1 & eth2 through a SOCKS proxy

Is there a way to redirect all traffic, UDP and TCP, coming to and from eth1 and eth2 through a SOCKS proxy (Tor) which then passes it through eth0? eth0: Internet in - leads to the main router, then ...
3
votes
1answer
112 views

Local DNS Server Refuses to Ask itself for DNS

I am running Debian 7 and have set up a DHCP and DNS server. Everything is working nicely, except for the server itself not following the DNS entries in BIND. The problem is that /etc/resolv.conf is ...
3
votes
4answers
2k views

Sniffing packets through router

I would like to create a system like this. The user would connect through a wifi network which would reroute all http requests and responses through the network card on a computer thus allowing that ...
3
votes
1answer
1k views

How do I route traffic through specific interface for a specific process

I have a script that runs from cron every 15 minutes. The script is meant to ping my DNS server to update a dynamically changing IP. I want this script to ping through the wlan interface and not the ...
3
votes
2answers
1k views

Xen, bridge and multiple IPs on CentOS

There's a new server that is assigned 5 IP addresses. I want to use Xen to run several VMs with various services. This is my first attempt to install Xen, I use this tutorial as a guideline. Stuck ...
3
votes
2answers
9k views

Linux Networking routing to virtual ip addresses from a different subnet

New to linux networking, had a question about routing to virtual ip addresses from a different subnet. I have three servers (they can all ping each other): A 10.10.51.182 (connected to router ...
3
votes
2answers
509 views

Block specific IP from accessing gateway

Suppose you are on linux internet gateway/router. What would you do to block a client with specific IP using bash script. I prefer something like ./block_client.sh 192.168.1.123 to block and ...