LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-25-2004, 11:19 AM   #1
Moszer
LQ Newbie
 
Registered: Aug 2003
Location: Fargo, ND
Posts: 25

Rep: Reputation: 15
forward all dns requests to one page


Hello All,

I'm setting up bind on a linux box that I want to forward every request that comes to it to a specific webserver I've setup. I've looked all over the place and can't find how you do this, but I know you can... anyone have any insight?

Thanks in advance..
 
Old 05-25-2004, 11:36 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
every ? i cannot get.
bind listens to port 53 (domain port). when your clients ask it some domians it finds the ip of that domains and send the answer to clients. also it answers other nameserver if they ask about your domain. u can just add a record for your web server in zone files. u cannot forward all http recuests to your web server with bind.

can u explain moreabout your question?

Last edited by maxut; 05-25-2004 at 11:37 AM.
 
Old 05-25-2004, 11:48 AM   #3
Moszer
LQ Newbie
 
Registered: Aug 2003
Location: Fargo, ND
Posts: 25

Original Poster
Rep: Reputation: 15
What I'm doing is setting up a wireless authentication system based on mac's and some other stuff, and when some random dude walks in the building we want him to get an ip from the dhcp from a different pool then registered users, which we did with the dhcpd.conf.. Along with that differnent ip we give him the ip of a dns I've setup on the same box. So then every web request the guy does will get redirected to the defualt page on a webserver we setup, also on that same box that says "You aren't a registered user of the wireless, please stop by and register blah blah blah"
The cable company up here in Fargo uses the exact same thing to register their cable modem users. If you hook up for the first time you get a registration page from one of their webserver and once you register your mac with them you get through normal every time..


So the only part I can't figure out is how to get bind to return the ip of the webserver I want for any and all page requests that come to it..
 
Old 05-25-2004, 12:37 PM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
u need iptables commands as i understand.
do u have a like that network:
that guy (LAN2)-----linux(firewall,router,nat,etc)----internet
........................................ |
............................web server (for that guy) LAN1

if it is so u can forward http recuests which come from LAN2 network to web server by typing following iptables command:
#iptables -t nat -A PREROUTING -s LAN2/subnet -p tcp --dport 80 -j DNAT --to webserver_ip
#iptables -t nat -A POSTROUTING -d LAN2/subnet -s webserver_ip -p tcp --sport 80 -j SNAT --to linux_LAN2_NIC_ip
 
Old 05-25-2004, 01:34 PM   #5
Moszer
LQ Newbie
 
Registered: Aug 2003
Location: Fargo, ND
Posts: 25

Original Poster
Rep: Reputation: 15
keewl..

One guy told me that might work.. I'll giver a shot..

Thanks!
 
  


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
Going back, Going forward in firefox, Add the Current page as BookMark xbaez Linux - Software 2 05-20-2005 12:26 PM
Forward FTP Requests mitt Linux - Networking 7 04-08-2005 10:11 AM
Apache, forward requests to a vmware virtual machine Hube Linux - Software 2 09-02-2004 09:58 AM
Mod_Proxy (Apache) won't forward requests bentman78 Linux - Software 1 04-20-2004 08:49 AM
Unresovlable Web Proxy DNS requests tsa Linux - Networking 0 03-19-2004 10:18 AM

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

All times are GMT -5. The time now is 03:15 AM.

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