All of lore.kernel.org
 help / color / mirror / Atom feed
* "stand-alone" web server
@ 2006-07-11 20:30 KSCOTT9
  2006-07-11 21:19 ` Taylor, Grant
  2006-07-12 14:33 ` Martijn Lievaart
  0 siblings, 2 replies; 3+ messages in thread
From: KSCOTT9 @ 2006-07-11 20:30 UTC (permalink / raw)
  To: netfilter

I am trying to set up a "stand-alone" internet lab environment where my
web server will be on the internet side of a router serving up a
training website. The clients will only be able to access those web
pages, not the "Real" internet. It would best if users were routed to
that web page regardless of whatever internet address they entered
(except for server management screens). I'm thinking the following:

Requested website //  Destination page served up
cnn.com           //    myserver/index.html
whatever.com      //    myserver/index.html
myserver:8081     //    myserver/management.html
cnn.com:8081      //    myserver/management.html

I'm think maybe appropriate entry(s) in iptables will do this but I am
not quite sure how to proceed. I think I need something like:

iptables -A PREROUTING  -p tcp -dport 80 -j REDIRECT --to-ports 80     
  # web server
iptables -A PREROUTING  -p tcp -dport 8081 -j REDIRECT --to-ports 8081 
  # mgmt server
The two server need to be configured to answer on those ports 

or  maybe
# let only appweb answer normal port 80 traffic
 iptables -A INPUT -p tcp --dport 80 ! --uid-owner appweb -j REJECT
--reject -with -tcp-reset 

Am I close?  Thanks 
Ken



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-12 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 20:30 "stand-alone" web server KSCOTT9
2006-07-11 21:19 ` Taylor, Grant
2006-07-12 14:33 ` Martijn Lievaart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.