LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-30-2009, 09:48 AM   #1
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Bind to interface OR how to ignore routing


I have a box ("monitor") intended to monitor whether a captive portal server is working. One interface (eth1) is statically IP'ed as the management interface, so I can check the box, see if the captive portal is up (web page hosted on "monitor"), SSH in, etc. and is the default route. The other interface is on a subnet as a client of the static portal.

Code:
+----------+
| monitor  |---eth1---> management LAN/default route
|          |---eth0---> captive portal LAN
+----------+
If you're not familiar with captive portals, the client (in this case "monitor") gets DHCP from the captive portal server. Then, the captive portal responds to a HTTP request for *any address* with a Location: redirect to its' own address and serves up a login page. Once the client logs in, IP traffic is passed to the actual destination IP.

The problem I'm having is, obviously, when I try to test this, HTTP traffic is routed out eth1, the default route, not eth0 which goes to the captive portal server. I've tried specifying --bind-address with wget and curl, but that simply sets the source IP while still following the kernel's routing tables.

Is there any easy way to bypass routing and specify the interface a packet is supposed to leave? Failing that, how low-level would my programming have to be to get this to work?

(It's not totally important to the discussion, but eth0 is actually a set of five q-tagged interfaces to monitor five captive portal servers.)

Thanks for any help.
-Jason

Last edited by acid_kewpie; 03-30-2009 at 09:51 AM.
 
Old 04-01-2009, 09:16 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
You can't set up the routing table to route captive portal's IP address(es) out the interface you want? Or do you need the capability to route that(those) IP address(es) out either interface?

Last edited by blackhole54; 04-01-2009 at 09:19 AM.
 
  


Reply



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
virtual interface routing noir911 Linux - Server 11 10-22-2008 06:11 PM
Bind gui interface bdavide Linux - Newbie 5 06-15-2008 08:12 AM
why lo interface is not in routing table? montyleesam Linux - Networking 1 06-10-2008 01:06 AM
rsyncd bind to a interface Greenpie Linux - Networking 1 10-22-2004 07:34 AM
how to ignore the routing table 155092376 Linux - Networking 4 07-22-2003 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration