Sponsored Content
Special Forums IP Networking Route packets over specified interface Post 302859293 by Corona688 on Wednesday 2nd of October 2013 05:38:39 PM
Old 10-02-2013
For starters, whether IP ranges are "open" has little to do with whether your computer actually uses them.

You need to set up rules in your routing table, not your firewall, that things going to IP's related to spotify should go to gateway x via interface y. This rule has to come before your catchall rule.
 

9 More Discussions You Might Find Interesting

1. Solaris

Had to bounce interface to add network route

Hi All, yesterday I was trying to add a network route to my solaris 8 host using 'route add'. Everytime I tried, I kept getting the response 'network is unreachable'. I was trying all kinds of different methods, however I eventually got it to work after bouncing the interface that I was... (2 Replies)
Discussion started by: badoshi
2 Replies

2. Solaris

Route new network interface Solaris 8

Hi there, I'm trying to configure an additional network interface on Solaris 8 (eri0). The interface has been activated, but all the frames are still routed to the current default interface (ce0) I've tried following command (with various syntaxes...) unsuccessfully so far: # route add... (2 Replies)
Discussion started by: sreiniche
2 Replies

3. Solaris

Network interface down after adding static route

Please , I have a problem I have add a statis route on Solaris 10, but after this, the network interface of Server was Offline. The system is in cluster mode (3.2) route add -net 10.10.1.128 -netmask 255.255.255.128 10.10.1.51 ------------------- lo0:... (1 Reply)
Discussion started by: Ruggero
1 Replies

4. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

5. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

6. Solaris

route and interface configuration in solaris

Hi, Every time when i boot my system i have to manually issue the following commands. ifconfig elxl0 plumb 192.168.200.129 netmask 255.255.255.0 up route add default 192.168.200.1 I need some help so that it should be configured permanently and i wouldn't have to manually issue... (2 Replies)
Discussion started by: malikshahid85
2 Replies

7. IP Networking

How to route all incoming packets from one virtual interface?

Hello, I'm trying to route all packets arriving at a particular interface by entering the same interface the virtual interface eth1: 2 and now everything is routed by default gw configured on eth1. eth1 Link encap:Ethernet HWaddr 0a:0e:64:18:52:72 inet addr:192.168.10.15 eth1:2 ... (1 Reply)
Discussion started by: faka
1 Replies

8. IP Networking

How to route packets back to incoming interface?

Hi folks, I have a debian server running an Apache daemon on the eth0 interface. Now from time to time the server has to open an openvpn connection (tun0) to other networks to get some data from there. During this period the Apache is no longer reachable under it's IP address on eth0 because all... (6 Replies)
Discussion started by: flyingwalrus
6 Replies

9. IP Networking

Packet going out of wrong interface due to OS automatically added cache route with lower metric

RHEL 7.0, IPV6 Scenario: I have routed specific network using network scripts. 1. "ip -6 route show" shows that route has been added. ( with metric 1024) 2. Ping of the specific IP through that route is successful. 3. Now after few days, for some reason, we see that cache route appears for... (3 Replies)
Discussion started by: msr1981
3 Replies
IP-RULE(8)                                                             Linux                                                            IP-RULE(8)

NAME
ip-rule - routing policy database management SYNOPSIS
ip [ OPTIONS ] rule { COMMAND | help } ip rule [ list [ SELECTOR ]] ip rule { add | del } SELECTOR ACTION ip rule { flush | save | restore } SELECTOR := [ not ] [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK[/MASK] ] [ iif STRING ] [ oif STRING ] [ pref NUMBER ] [ l3mdev ] ACTION := [ table TABLE_ID ] [ nat ADDRESS ] [ realms [SRCREALM/]DSTREALM ] [ goto NUMBER ] SUPPRESSOR SUPPRESSOR := [ suppress_prefixlength NUMBER ] [ suppress_ifgroup GROUP ] TABLE_ID := [ local | main | default | NUMBER ] DESCRIPTION
ip rule manipulates rules in the routing policy database control the route selection algorithm. Classic routing algorithms used in the Internet make routing decisions based only on the destination address of packets (and in theory, but not in practice, on the TOS field). In some circumstances we want to route packets differently depending not only on destination addresses, but also on other packet fields: source address, IP protocol, transport protocol ports or even packet payload. This task is called 'policy routing'. To solve this task, the conventional destination based routing table, ordered according to the longest match rule, is replaced with a 'routing policy database' (or RPDB), which selects routes by executing some set of rules. Each policy routing rule consists of a selector and an action predicate. The RPDB is scanned in order of decreasing priority (note that lower number means higher priority, see the description of PREFERENCE below). The selector of each rule is applied to {source address, des- tination address, incoming interface, tos, fwmark} and, if the selector matches the packet, the action is performed. The action predicate may return with success. In this case, it will either give a route or failure indication and the RPDB lookup is terminated. Otherwise, the RPDB program continues with the next rule. Semantically, the natural action is to select the nexthop and the output device. At startup time the kernel configures the default RPDB consisting of three rules: 1. Priority: 0, Selector: match anything, Action: lookup routing table local (ID 255). The local table is a special routing table con- taining high priority control routes for local and broadcast addresses. 2. Priority: 32766, Selector: match anything, Action: lookup routing table main (ID 254). The main table is the normal routing table containing all non-policy routes. This rule may be deleted and/or overridden with other ones by the administrator. 3. Priority: 32767, Selector: match anything, Action: lookup routing table default (ID 253). The default table is empty. It is reserved for some post-processing if no previous default rules selected the packet. This rule may also be deleted. Each RPDB entry has additional attributes. F.e. each rule has a pointer to some routing table. NAT and masquerading rules have an attribute to select new IP address to translate/masquerade. Besides that, rules have some optional attributes, which routes have, namely realms. These values do not override those contained in the routing tables. They are only used if the route did not select any attributes. The RPDB may contain rules of the following types: unicast - the rule prescribes to return the route found in the routing table referenced by the rule. blackhole - the rule prescribes to silently drop the packet. unreachable - the rule prescribes to generate a 'Network is unreachable' error. prohibit - the rule prescribes to generate 'Communication is administratively prohibited' error. nat - the rule prescribes to translate the source address of the IP packet into some other value. ip rule add - insert a new rule ip rule delete - delete a rule type TYPE (default) the type of this rule. The list of valid types was given in the previous subsection. from PREFIX select the source prefix to match. to PREFIX select the destination prefix to match. iif NAME select the incoming device to match. If the interface is loopback, the rule only matches packets originating from this host. This means that you may create separate routing tables for forwarded and local packets and, hence, completely segregate them. oif NAME select the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device. tos TOS dsfield TOS select the TOS value to match. fwmark MARK select the fwmark value to match. priority PREFERENCE the priority of this rule. PREFERENCE is an unsigned integer value, higher number means lower priority, and rules get pro- cessed in order of increasing number. Each rule should have an explicitly set unique priority value. The options preference and order are synonyms with priority. table TABLEID the routing table identifier to lookup if the rule selector matches. It is also possible to use lookup instead of table. suppress_prefixlength NUMBER reject routing decisions that have a prefix length of NUMBER or less. suppress_ifgroup GROUP reject routing decisions that use a device belonging to the interface group GROUP. realms FROM/TO Realms to select if the rule matched and the routing table lookup succeeded. Realm TO is only used if the route did not select any realm. nat ADDRESS The base of the IP address block to translate (for source addresses). The ADDRESS may be either the start of the block of NAT addresses (selected by NAT routes) or a local host address (or even zero). In the last case the router does not trans- late the packets, but masquerades them to this address. Using map-to instead of nat means the same thing. Warning: Changes to the RPDB made with these commands do not become active immediately. It is assumed that after a script finishes a batch of updates, it flushes the routing cache with ip route flush cache. ip rule flush - also dumps all the deleted rules. This command has no arguments. ip rule show - list rules This command has no arguments. The options list or lst are synonyms with show. ip rule save save rules table information to stdout This command behaves like ip rule show except that the output is raw data suitable for passing to ip rule restore. ip rule restore restore rules table information from stdin This command expects to read a data stream as returned from ip rule save. It will attempt to restore the rules table information exactly as it was at the time of the save. Any rules already in the table are left unchanged, and duplicates are not ignored. SEE ALSO
ip(8) AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com> iproute2 20 Dec 2011 IP-RULE(8)
All times are GMT -4. The time now is 10:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy