91
votes
How do I delete a route from Linux routing table
with the route -n command you'll obtain
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.178.1 0.0.0.0 UG 0 ...
- 1,597
47
votes
How to set the preferred network interface in Linux
Here's the complete answer, in case it helps others:
To make packets with destinations 192.168.10.* use eth0, and all other packets use eth1:
1) View your current routing table
ip route list
One ...
- 641
42
votes
Accepted
What makes a private IP address not routable?
Private IP addresses are routable, albeit they are not publicly routed. Basically, a router will route a private address to private/internal LAN, rather than to the internet.
To expand my answer: a ...
- 45.1k
37
votes
Multiple devices with one IPv6 to the Internet?
IPv6 is designed to not do that. Trying IPv4 style NAT with IPv6 will break things. That said, I'm pretty sure you can do NAT IPv6 with Linux iptables, so it's not impossible. But I would strongly ...
- 7,662
35
votes
Accepted
Is there a cloud-based reverse proxy solution in AWS?
You can use AWS API Gateway (documentation).
API Gateway helps developers deliver robust, secure and scalable mobile and web application backends. API Gateway allows developers to securely connect ...
- 791
33
votes
Accepted
Does adjusting a domain name's TTL actually matter?
They're not supposed to, but some DNS services may treat this as more of a suggestion than a hard rule. They may honor the setting down to some minimum, or they may ignore your TTL completely and ...
- 12.9k
31
votes
Accepted
Routing selection: specificity vs metric
The routes metric is to set preference among routes with equal specificity. That is true of routing in general (i.e. Cisco, Windows, etc). So the model works like:
Find the most specific route (aka ...
- 82.8k
29
votes
Accepted
Are people really going to use public IPv6 addresses on their private networks?
Is that how IPv6 is intended to work?
In short, yes. One of the primary reasons for increasing the address space so drastically with IPv6 is to get rid of band-aid technologies like NAT and make ...
- 16.6k
26
votes
Accepted
Why isn't there a route for localhost in Ubuntu?
The route command is deprecated, and should not be used anymore.
The new way is to use the iproute set of commands, which are all invoked with ip followed by an object. For example:
$ ip route show
...
- 3,826
25
votes
Adding a route to specific host go out a specific interface
On a newer machine using the ip binary the syntax to add a route is slightly different (but thankfully really consistent for hosts/networks/etc).
ip route add 10.0.1.3 via 10.0.0.1 dev eth0
If you ...
- 776
23
votes
How to reload default Mac OSX routing table without rebooting
I was running into this issue while using a home OpenVPN server and connecting to it using the Tunnelblick application on Mac.
What was happening on my end is that a route with my home IP as the ...
- 331
23
votes
Why "Nexthop has invalid gateway" when it seems to be defined?
Perhaps something like:
ip route add <gateway IP> dev <interface on which it should be reachable>
and then
ip route add default via <gateway ip>
"Direct connection" can ...
- 331
21
votes
IPv6: differences between "routed prefix" and "link prefix"?
The easiest way to understand the difference between the two is via an example showing the hierarchical nature of the prefixes.
An example hierarchy
An ISP has been allocated a prefix from a RIR (...
- 30.1k
21
votes
Are people really going to use public IPv6 addresses on their private networks?
We use public IPv6 addresses in our company network for all devices.
We use a stateful firewall on our gateway, that:
allows all icmpv6
allows new connections from internal network out
allows ...
- 1,563
21
votes
Multiple devices with one IPv6 to the Internet?
IPv6 doesn't have a NAT standard the way IPv4 does. There is an EXPERIMENMTAL RFC for one-to-one NAT (one outside address for each inside address) on IPv6, but explicitly forbids what you want to do (...
- 3,198
19
votes
Can switches do VLAN routing?
L2 switches cannot do Inter-VLAN routing, since they only take care of L2 network stuff, that is, forward frames between links. If it is a L3 switch, then it can do IP protocol routing between VLANs.
- 35.8k
19
votes
Accepted
IP Routing - For Office Move
When a host tries to access another host in the same subnet, it issues an ARP request for the host MAC address. If no ARP reply is received, then the host is declared unreachable.
So, therefore you ...
- 35.8k
18
votes
Accepted
How do I make actual use an IPv4 block that I own?
There are two things you need:
First you need an ISP that will act as the sponsoring LIR for you. Their role is just book keeping and maintaining the contractual chain between you and RIPE NCC.
Then ...
- 7,662
18
votes
Does adjusting a domain name's TTL actually matter?
Only if you make that change to the TTL more than three hours in advance of the IP address change.
Remember that the TTL tells other DNS servers how long to cache records. So you must reduce it at ...
- 240k
18
votes
How to verify a AWS VPC (S3) endpoint works?
I guess the straightfwd way is to actually probe those routes.
You can traceroute to s3 and see if the NAT Gateway's internal IP is anywhere in the output (eg. the first hop).
First, check the NAT ...
- 280
17
votes
OpenVPN - how to stop public traffic routing through vpn server?
The problem was caused by Network Manager which was handling the opvn config. To disable sending all traffic through the VPN do this
Click NetworkManager applet icon > VPN Connections > Configure VPN....
- 501
17
votes
Accepted
Disabling rp_filter on one interface
Info there: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/networking/ip-sysctl.txt?h=v4.9#n1090
Note the last sentence that would explain your attempts:
...
- 9,496
16
votes
Accepted
MULTI: bad source address from client - any one-off solutions?
You asked: "Can someone explain why this problem occurs in the first place?"
Based on what is reported in the official OpenVPN FAQ I bet it's caused by a routing problem within the OpenVPN engine.
...
- 3,988
16
votes
Accepted
Difference between "genmask" and "netmask"?
According to nixCraft:
Genmask : The netmask for the destination net; 255.255.255.255 for a host destination and 0.0.0.0 for the default route.
It's called 'genmask' because it shows the '...
- 1,035
15
votes
Difference beetween DNAT and REDIRECT in IPTABLES
REDIRECT does alter the destination IP address to send to the machine itself as answered by Warner@. But I'd say that answer is not totally correct, or a bit misleading.
REDIRECT is not just for ...
- 151
14
votes
Accepted
Can I add a static route to a VPN network if the default gateway IP is dynamic? (Windows 7)
I've found out the answer myself:
You don't actually need to specify the default gateway - you can use the catch-all of 0.0.0.0 and then specify the interface number instead (the docs do not make this ...
- 654
14
votes
Are people really going to use public IPv6 addresses on their private networks?
If there is no need for outside connectivity, then private networks can be used. That is the reason for defining private address space also in IPv6.
NAT is a hack that was invented to delay IPv4 ...
- 35.8k
14
votes
Accepted
Use ip route add to add multicast routes to multiple interfaces
That you have multicast going through your Linux box by using unicast routing is a combination of a couple of lucky circumstances.
Multicast routing is not the same as unicast routing. Unicast ...
- 3,198
13
votes
Accepted
When to use routable vs non-routable IP addresses
Those ranges you list are described in this RFC 1918 - Address Allocation for Private Internets
The title gives away their use case: "... for Private Intranets".
All IP Address ranges are ...
- 14.3k
12
votes
Why "Nexthop has invalid gateway" when it seems to be defined?
A gateway address can only be on a directly connected network. The 10.7.0.0/24 network is not directly connected to your host 10.0.0.2, but is instead separated by another network, which is connected ...
- 240k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
routing × 3616networking × 1043
linux × 648
iptables × 540
vpn × 407
openvpn × 407
nat × 252
linux-networking × 228
ip × 213
router × 183
firewall × 169
cisco × 165
subnet × 158
windows × 155
ubuntu × 141
ipv6 × 130
vlan × 118
gateway × 114
switch × 108
ip-routing × 106
domain-name-system × 96
pfsense × 91
amazon-web-services × 89
centos × 83
debian × 75