Networking :: How To Add A Route And Keep It

Jan 19, 2009

I have a server in the office and when I need to connect via cable I have to start up a root terminal and type in:

route add -net 0.0.0.0 gw 10.0.1.10 dev eth0

Is there a way to have this saved so I don't have to re-type it every time ? I already tried adding the command in /etc/rc.local and also in /etc/network/interfaces but it doesn't.

View 2 Replies


ADVERTISEMENT

Networking :: Route Eth2 TCP Packets To Tun0 With IPTABLES And IP RULE/ROUTE?

May 8, 2011

I have 3 network interfaces on my Linux Router :

Interface - Gateway - Type

Code:

br0 - 192.168.0.1 - Internet
eth2 - 192.168.1.1 - LAN
tun0 - 10.0.0.2 - VPN (via br0)

What I'd like to do is to route all TCP packets coming from eth2 to tun0 where a VPN client is running on 10.0.0.2. If I delete all default routes and if I add a new route to tun0 like :

Code:

route del default
route add default gw 10.0.0.2

Everything is fine, and everyone on eth2 can reach the Internet using the VPN access. Now the problem is that my VPN client does not allow any other protocols other than TCP. And I also want to allow VPN access only to eth2, no other LAN nor the router itself. use iptables to filter any TCP packets and mark them, so they can be sent to tun0, while any other packets can reach the Internet via br0 (192.168.0.1). I found on the Internet that we can mark packets before they get routed. Using the following commands :

Code:

iptables -t mangle -A PREROUTING -j MARK --set-mark 85 -i eth2 -p tcp --dport 80
ip route add table 300 default via 10.0.0.2 dev tun0
ip rule add fwmark 0x55 table 300

First of all, --dport 80 never work... :/ I wanted to filter TCP 80 packets coming from eth2, but none of them seems to be HTTP packets... oO (very strange...). Nevermind, I decided to forget about the --dport option. I use the "iptables -L -v -t mangle" command to see how many packets are marked, and it is working fine, all TCP packets coming from eth2 are marked. Now the problem is that none of them are routed to tun0 they are all respecting the "route -n" rules... and not the "table 300" rule I have created.

View 4 Replies View Related

Networking :: Route-eth - Adding A Static Route?

Apr 29, 2009

I would like to add a static route, however I do not understand what is meant by the Address setting below

GATEWAY2=10.241.58.62
NETMASK2=255.255.255.224
ADDRESS2=10.241.57.32

Does this mean any addresses beginning with 10.241.57.32 are routed over the gateway 10.241.58.62 an address range

View 3 Replies View Related

Networking :: Definition: "a Process That Replaces A Series Of Related, Specific Routes In A Route Table With A More Generic Route"

Oct 21, 2010

I got this definition:"a process that replaces a series of related, specific routes in a route table with a more generic route." honestly I found it not so clear.. I want to know if this definition is correct and also more details about this subject..

View 1 Replies View Related

Ubuntu Networking :: Error - "route: Netmask Does Not Match Route Address"

Jan 25, 2011

Having trouble getting my Netgear WNA1000 working thru wireless router. Have tried lots of suggestions from other threads to no avail. Someone suggested that th routing table isn't set correctly, so have been trying to use the follwing to make the proper entry in the routing table: sudo route add -net 192.168.0.1 netmask 255.255.255.0 dev wlan0

Result: error message stating with:
"route: netmask does not match route address"

followed by "Usage" instructions which tell me to do what I just did. Any ideas on how I can populate my routing table with correct entry for my wireless card? Not to complicate matters, but I temporarily turned off encryption on my router to eliminate that as a possibility until I get connected. So maybe it'still trying to connect via encrypted mode - do I need to turn off encryption on my (client) end?

View 2 Replies View Related

Networking :: How To Route Traffic To The Vpn

May 11, 2010

I've succesfullly connected to my vpn with kvpnc, but none of my traffic is going through the vpn! I dont know how to route traffic to the vpn. for instance, when I go to whatsmyip.com it still has my previous ip.

View 1 Replies View Related

Networking :: No Route To Host

Aug 21, 2009

I use linux.

I have below error, no route to host.

View 6 Replies View Related

Networking :: Route Add -net 192.168.98.0 Netmask 255.255.255.0 Gw 192.168.99.1

May 31, 2010

Code: route add -net 192.168.98.0 netmask 255.255.255.0 gw 192.168.99.1 -net 192.168.98.0 , is it for ip address of the client/host? man route says , "target is a network".What does it mean?

View 1 Replies View Related

Networking :: Route Two Pc's - Communicate To Each Others

Dec 3, 2010

I'm using Fedora 9 and has finished the DHCP for my eth2 and static on eth0. I would like to add a route so that the 192.168.22.x eth0 and 192.168.26.x eth2 can communicate to each others,.

View 3 Replies View Related

Networking :: What Does Route Command Do

Mar 16, 2011

What does it do? Any examples on how I use it?

View 2 Replies View Related

Ubuntu Networking :: How To Add Route Mask

Mar 11, 2010

How can I add this to Ubuntu so that I can effectively use both networks connected to my machine. All I do in WinXP is run this from the command prompt: route -p add 10.0.0.0 mask 255.0.0.0 10.15.122.9

View 3 Replies View Related

Ubuntu Networking :: Re-route Audio Over Lan?

Apr 12, 2010

How would I go about re-routing the audio of a Jaunty PC, to another on the same LAN?

View 3 Replies View Related

Networking :: Can Ssh From A Computer But Not Into It - No Route To Host

Apr 11, 2010

I have 3 computers on a local home network. Computer 1 is not receiving incoming anything from other computers on the network, and I don't know why. The regular internet works fine.

Computer 1 can ping and ssh into either 2 or 3. 2 can ping and ssh into 3 and vice versa. But nothing can ping OR ssh into 1. Trying to do so says "no route to host".

All computers are running Ubuntu Karmic.

View 7 Replies View Related

Networking :: Route Packets Across NICS's?

Mar 11, 2010

I have two NIC's interfaces on my linux machine(eth1 and eth2). Each have different IP addresses(10.0.0.1, 10.67.7.1). These two interfaces are connected together through hub. Here is the my question?

1) If I 'ping 10.0.0.1', it should go out through network interface eth2 and through hub and enter on eth1 and response also travel through similar direction.

2) If I 'ping 10.67.7.1', it should go out through network interface eth1 and through hub and enter on eth2.

How can setup routing table for this,I have tried setting up routing and iptables, etc.. nothing helped.

If any one good router/networking guy, you should know this one.I am doing a project, I want this way to handle this.

View 9 Replies View Related

Networking :: Route 2 Subnets Between 2 Routes?

Oct 28, 2010

I have some CISCO,Linux related problem with 2 Class C subnets:

192.168.64.0 -> PC5
192.168.65.0 -> PC6

Here's a picture of my situation: [URL]

HQ has to have 2 STATIC routes in order those 2 "PCs" mentioned above to have end to end connectivity with NETWORK A and NETWORK B. Now I try with

route0 -> network: 0.0.0.0, mask: 0.0.0.0, nexthop: Serial 0/0/0
route1 -> network: 0.0.0.0, mask: 0.0.0.0, nexthop: Serial 0/0/1

And it seems to work but I don't think it's proper! I feel it's kinda wrong ... but all my other attempts to set another couple of static routes ends in "Request timed out" and thus connection lost.

View 1 Replies View Related

Networking :: Ip Route Mtu Doesn't Work?

Feb 26, 2010

I'm trying to troubleshoot some networking issues I'm having between my Linux servers connecting to a server at another location after a Cisco ASA firewall has been installed at my location. I can make the connection work if I lower the mtu on the NIC (ifconfig eth0 mth 1000) - however that supposedly can break the local network if I don't set everything else's mtu to match. Supposedly I can use the iproute package (debian etch) to lower the mtu on a per-route basis, but it doesn't seem to work for me.

Code:
ip route delete default
ip route add default via X.X.X.X mtu 1000

View 2 Replies View Related

Networking :: No Route To Host - Put Can Ping?

May 9, 2011

I have a server that I can ping, and I can connect remotely with ssh to it. But when I try to connect to apache (port 80) I get "no route to host". But I can connect to localhost It's not just my client system that is having this problem but also systems that are on the same subnet There is no firewall running on the server route on the server

[Code]...

View 9 Replies View Related

Networking :: Route Add With Specific Interface?

Apr 18, 2009

I have an Asterisk-server with 2 interfaces, a WAN-interface (eth1) and a LAN-interface (eth0).

SETUP : IAX-provider(internet) --> firewall --> Asterisk-server --> switch --> clients_on_LAN

So everything coming from the IAX-provider on port 4569 is forwarded to the Asterisk-server's WAN-interface (eth1). This needs then be routed to an internal SIP-phone (an IVR-system will define which one) via eth0. When a call is initiated from an internal SIP-phone (they register to the IP-address assigned to eth0) it needs to be routed via eth1 to the gateway (192.168.4.250). Asterisk will setup an IAX-channel on WAN-interface (eth1) to the IAX-provider (via gateway). So... will this work :

Code:

route add -net ip_IAXprovider netmask 255.255.255.0 gw 192.168.4.250 dev eth1

Code:

route add -net 192.168.4.0 netmask 255.255.255.0 dev eth0 (no gateway needed for the LAN-interface, communications to the gateway need to go via the WAN-interface !)

View 4 Replies View Related

Networking :: Sendmail - No Route To Host ?

Feb 22, 2011

We have a Red Hat Linux server that sends email out daily. It points to and Exchange server for smtp. It works fine, however, at least once a day, an email will fail and in the maillog I see "No route to host". After a few minutes, everything is working fine. The Linux server and Exchange are on the same VLAN and IP subnet.

View 2 Replies View Related

CentOS 5 Networking :: 5.2 Won't Route To Internet Via Ppp/usb?

Mar 10, 2009

I have a 4.7 VPS web server on the net and it works very well. I am intending to upgrade it to Centos 5.x and have been having a play using VMWare Appliances and VMWare Player. I have therefore installed a local 4.7 applicance (all works well) and a 5.2 appliance (can't get basic internet connectivity).

I am running VMWare in Vista (apologies) and am connecting via a broadband modem (which effectively presents a serial modem to the computer via a USB interface). Using VMWare I am hooking this up to either the 4.7 appliance (works fine) or the 5.2 appliance (detects fine and connects but there is a problem). I think the issue with 5.2 is a firewall or a routing issue

I have prepared a report of the most common things people would need to know. The 5.2 appliance can see the USB device (lsusb), connects fine and obtains an IP and DNS addresses (wvdial) but ping fails. However the same on the 4.7 appliance works fine - I can use yum, ping and lynx etc. I have turned off the firewall on both appliances, but something is still getting in the way in 5.2!

***********************************
CENTOS 5.2 - ROUTING ISSUES?
***********************************
* Have disabled the firewall using system-config-security-level
> lsusb
lsusb
Bus 001 Device 007: ID 0fce:d0c5 Sony Ericsson Mobile Communications AB

[Code]....

View 7 Replies View Related

Fedora Networking :: No Route To Host Using Showmount On 12?

Feb 14, 2010

I have two system, an Intel Core2 Duo system running the 32-bit version of Fedora 12, and a MacBook Pro running the 64-bit version of Fedora 12. I'm using the Gnome desktop on each system. I have enabled all the services I believe are necessary to support NFS including nfs, rpcbind, rpcgssd, rpcidmapd, and rpcsvcgssd on each system. I have added an entry to my /etc/exports file to export my home on each system, and if I type this command:

$ showmount -e localhost

I get a result like this:

Export list for localhost:

/home/tron 192.168.200.101,192.168.200.100

However when I issue this type of command:

$ showmount -e <remote host name>

I get this kind of result: rpc mount export: RPC: Unable to receive; errno = No route to host Research on the Internet indicates this is usually due to a firewall problem. However, I use the Firewall Configuration application to the disable the firewall on both systems, and I continue to get the same result. What is needed so I can get this two machines to display their exported file shares remotely? It turns out I did not disable the firewall when I thought I had. Now that I'm certain the firewall is disabled on both systems, I'm able to get the showmount command to succeed.

View 5 Replies View Related

Ubuntu Networking :: WAN/LAN Routing - Cant Route Back In?

Mar 13, 2010

I've got an Ubuntu web server running 9.04 & Apache2. Ive got 2 NICs, one with an internal address for the LAN and one with and external address for the WAN to host the websites. My IP configuration is as follows (/etc/network/interfaces):

# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface (WAN)
iface eth0 inet static

[Code]...

When i do a traceroute from a LAN PC and it makes it all the way to the router and then just stops. I'm probably missing something very simple, its been probably 10 years since i took a class in this.

View 9 Replies View Related

Ubuntu Networking :: Can't Ssh Into Computer - Says No Route To Host

Apr 11, 2010

I have 3 computers on a local home network. Computer 1 is not receiving incoming anything from other computers on the network, and I don't know why. The regular internet works fine. Computer 1 can ping and ssh into either 2 or 3. 2 can ping and ssh into 3 and vice versa. But nothing can ping OR ssh into 1. Trying to do so says "no route to host". All computers are running Ubuntu Karmic. I don't even know where to start figuring out what's causing this, but it's probably something simple. I'm using the IPs I found listed in my wireless router's web-based control panel.

View 9 Replies View Related

Ubuntu Networking :: How To Test A Route Through A Machine

Nov 19, 2010

I have a 10.04 install with 2 network cards. wlan0, and eth0. wlan0 is the internet connection. eth0 is the local network. I want to be able to have internet connection sharing between eth0 and wlan0. I have set everything up, using firestarter.

is there a way of testing the eth0->wlan0 routing from the machine itself? The routing table looks sound, but I would like a quick way of confirming it. Is there a tool, like PING or TRACEROUTE which will let me say "ping [URL] going through eth0" ?

View 2 Replies View Related

Ubuntu Networking :: Route DNS Queries Through Tunnel Too

Jul 6, 2011

I set up a routed OpenVPN server. Everything works fine. But I'd like to route the DNS queries thru the tunnel too. So I added:

[Code]....

Can't find server name for address 10.8.0.1: Non-existent domain Even thou I have a DNS server set up correctly (on the same server as the VPN) with recursion. I verified that by sending queries form external source, which worked fine. I suspect that the Bind server doesn't listen to the tun0-interface only eth0, but the Bind manual says it should listen to all interfaces by default. The server log shows:

Code:
named[9639]: client 10.8.0.10#3807: RFC 1918 response from Internet for 1.0.8.10.in-addr.arpa

How do I get these DNS queries to resolve thru the tunnel?

View 9 Replies View Related

Networking :: RDP Into RDP Server Avoiding Windows Route

Jan 28, 2011

Is it possible to for me directly RDP into my company's RDP server from my Linux OS, in same way I can RDP into it from my Windows OS on my work computer or home computer, which has the RDP setup settings you use to create the session?

Of course I can get into the work machine, and then the RDP session, but is there a way to go straight into it without using the Windows Desktop to click on RDP? Does Linux have an RDP program similar to the setup using on the Windows side, in terms of being able to configure the settings to get into an RDP directly?

View 2 Replies View Related

Networking :: Add Route To 1 IP Address Through Second Network Card

Sep 8, 2010

I have a server with 2 network cards. eth0 is used for all traffic and everything is working fine on this side. Eth1 is used for traffic to and from 1 ip address.

Lets say the ip address of eth1 is 123.123.123.10 and its gateway is 123.123.123.1. I need to pass all traffic to 123.123.123.20 through eth1. What command would i use?

View 1 Replies View Related

Networking :: Route Internet Traffic Over Second IP Address?

Mar 4, 2010

My ISP has given me 3 IP addresses to use for the internet (76.148.200.3, 76.148.200.4 and 76.148.200.5).

If I do a "wget whatismyip.com" or netcat into another server, I am appearing as 76.148.200.3.How do I change my route (command line) in linux to route internet traffic through 76.148.200.5?

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
code....

View 9 Replies View Related

Networking :: Route Internet Traffic Over Tun0?

Mar 28, 2010

I have eth0 and tun0. tun0 is a VPN tunnel going over eth0. Everything on the other end is setup and working fine, when I type Code: traceroute 4.2.2.1 I see my the ping is going over 192.168.2.99 (eth0). When I then type Code: route add -net 4.2.2.1 netmask 255.255.255.255 dev tun0 traceroute 4.2.2.1 I see ping is going over 10.8.0.1 (tun0) instead of eth0, so that is working

What does not work however is when I do Code: route add -net 0.0.0.0 netmask 0.0.0.0 dev tun0 traceroute 4.2.2.1 I get no ping! I believe the problem is because all traffic is routing over tun0, which means even the VPN tun0 needs to go through eth0, it can no longer do this. Is there a way around this where I can route everything except for 114.77.31.26 (which is my VPN gateway for tun0)?

View 18 Replies View Related

Networking :: Check When Kernel Has A Route To Particular IP Address?

Dec 11, 2010

I'm working on a userspace application that needs to find if the kernel has a route configured for a particular destination address, and what port it would be routed from. I'm hoping there is a simple kernel call that will do this for me, but haven't been able to find it yet :-)

I don't want to actually send a packet to do this, just query the kernel if where it *would* send the packet if I did.

The only method I've come up with is to get the kernel routing table through rtnetlink then check each entry to see if it matches my destination address. I guess this will work (after one or two tries to get the logic right ;-) ) but I'd rather do a single call if there is one.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved