Iptables linux and dsl modems with linux?


Question: this is my current setup at home: DSL modem (has linux) -> linux router -> internal network.

I want to do 2 things:
a) dmz the linux router so everything is redirected to it (except 2 ports to admin de modem)

b) be able to host various services from my internal network ( be it: http,ftp, games, streams, etc) to the internet

i've been killing myself trying to do this with tons of differetne iptables combinations but not success
anyone out there that can help?
thanks in advance to all the help!

Answer:
B) An example for http :
I assume that you have two ethernet cards in linux router,
eth0 connects to internal network and eth1 connects to DSL
modem, and assume that there is a web server on internal
network with this ip 192.168.1.10
here is your iptables command:

# iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.1.10:80

ps: if you have firewall in linux router you have to open port 80 in both ethernet cards.

A) you said "everything is redirected to it"?? what is that mean? everything? if you describe source and destination of packect you want to redirect, maybe i can help you :">
Are you trying to configure iptables manually from the command line?

I strongly suggest you download FireWall Builder from www.fwbuilder.org.

It will give you a GUI for configuring your firewall and generate an automatic script with the correct iptables commands in it

iptables rules are hard to configure manually and this GUI is very easy to use and will simplify your task
More Questions & Answers...
  • I wish to automatically sign in without keying in details every time i login?
  • Will upgrading my internet connection stop other computers on network from causing me to lag in online games?
  • Does anyone know where i can download the video street corner symphony by rob thomas for free?
  • How to avoid saving a fike in the client machine after transferring the file from the server?
  • True or False?
  • Which cheapest GPRS Internet ?
  • How do you turn off Verizon's EV network on a Razr V3m phone?
  • Why does this box appear reading 'network stalled-rebuffering stream'?
  • The questions and answers post by the user, for information only, AnswersRoom.com does not guarantee the right
    Copyright © 2007 AnswersRoom.com -   Terms of Use -   Contact us

    Hot Topic