LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-20-2009, 04:28 AM   #1
jrscandora
LQ Newbie
 
Registered: Jul 2005
Location: Evergreen, CO
Distribution: Slackware 11.0
Posts: 3

Rep: Reputation: 0
non-default route to static host through gateway for ppp failover testing


Hello Network Gurus in Linux-Land!

I have a routing table:

joe@rose:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
63.215.28.59 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
208.67.219.99 192.168.65.1 255.255.255.255 UGH 0 0 0 eth0
192.168.65.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 63.215.28.59 0.0.0.0 UG 0 0 0 ppp0
joe@rose:~$

and an eth0 interface:

joe@rose:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:01:03:ce:7c:51
inet addr:192.168.65.222 Bcast:192.168.65.255 Mask:255.255.255.0
inet6 addr: fe80::201:3ff:fece:7c51/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:1299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:181495 (181.4 KB) TX bytes:113809 (113.8 KB)
Interrupt:10

joe@rose:~$

That is not working the way I want it to!

My normal connection to the Internet from rose (192.168.65.222) is the default gateway out of my Linksys WRT54G at 192.168.65.1. When that fails, I fire up PPP and connect using my dial-up connection. But I want to kill PPP and go back to the fast connection as soon as it comes back up, so I had this idea to configure a route to a static host (208.67.219.99) out on the Internet and ping it every couple minutes via a daemon shell script (started by ppp's ip-up) to see if the eth0 interface can see the Internet yet. I had it working at one point, honest. But it's not working now, and I can't figure out why. When I do a:

joe@rose:~$ ping 192.168.65.1
PING 192.168.65.1 (192.168.65.1) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
^C
--- 192.168.65.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

joe@rose:~$ ping 208.67.219.99
PING 208.67.219.99 (208.67.219.99) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
^C
--- 208.67.219.99 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1012ms

joe@rose:~$


I can't reach my gateway or the static host on the other side of it.

Any ideas what I am doing wrong?

And I thank you for your help!

-js
 
Old 04-20-2009, 06:24 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
I suspect two issues.

1. your ping command is not suid (ls -l `which ping`)
2. iptables is blocking icmp traffic out (iptables -vnL)
 
Old 04-20-2009, 11:26 PM   #3
jrscandora
LQ Newbie
 
Registered: Jul 2005
Location: Evergreen, CO
Distribution: Slackware 11.0
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks datopdog! Ping was setuid, it was iptables and therefore the firewall, dumb user error. I'm using firestarter, I think I'll have to look into something a bit more configurable, maybe shorewall.
 
Old 04-21-2009, 02:20 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
If you are looking for an iptables front end, also take a look at vuurmuur http://www.vuurmuur.org/trac/ its easy to use and produces rules that are easy to debug.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 NIC's - one gateway, setup Static route to Host baba_jaga Linux - Newbie 1 04-14-2009 02:05 PM
/etc/sysconfig/route-interface default gateway serge Linux - Networking 2 01-29-2009 10:05 PM
IP_forward? Static route (-host)? HELP! haiders Linux - Networking 2 09-18-2006 01:45 PM
PPP daemon do not resetting the default gateway Woodsman Slackware 5 12-15-2005 10:38 AM
default route without a gateway scylla Linux - Networking 1 10-21-2004 01:40 AM


All times are GMT -5. The time now is 09:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration