<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Webserver under a firewall in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997946#M5173</link>
    <description>Further to Claudio's tips, and to make short answers to you last questions :&lt;BR /&gt;&lt;BR /&gt;When you boot, a directory called /etc/rc.d/ has subdirectories called rc1.d rc2.d and so on. Inside, there is a list of programs that has to be launched at this stage. There is a copy of each in init.d directory.&lt;BR /&gt;&lt;BR /&gt;What chkconfig does it that it adds to the relevant directory services to launch on startup.&lt;BR /&gt;&lt;BR /&gt;You can add it by yourself in those directories (ading in rcx.d a number looking like S for start plus 'last S+1' you see there).&lt;BR /&gt;&lt;BR /&gt;You can also start or launch a service by typing 'service lokkit start (or stop, or restart to stop and restart)' directly, replacing lokkit by the service name you wish. Beware that it'll launch it now, but it won't be turned on at boot time, it's just launched now...&lt;BR /&gt;&lt;BR /&gt;When you have 2 firewalls running, like you have, it's interesting !&lt;BR /&gt;Look into your rc3.d or rc5.d (depending on if you boot on graphical or shell startup), and look at the numbers closed to the program names : they are the order in which things must be launched or stopped (killed, K) ! The highest number will be the right one, desactivating Ip tables policies set up by the other. They actually shouldn't conflict as they do not manage same things (as you know from Bastille install), even if it's off no use to have them both. One good idea would be to desactivate firewalling in Batsille, and let it to lokkit...&lt;BR /&gt;&lt;BR /&gt;Iptables -F flushes all the rules, bringing you back to the default policy which should be, if Bastille installed 'drop all' ! So no net anymore... It should be fixed on restarting services or machine.&lt;BR /&gt;&lt;BR /&gt;Redhat also has good tips on all these things, see :&lt;BR /&gt;&lt;BR /&gt;many things on security (maybe too much) :&lt;BR /&gt;&lt;A href="http://www.europe.redhat.com/documentation/rhl8.0/rhl-sg-en-8.0/" target="_blank"&gt;http://www.europe.redhat.com/documentation/rhl8.0/rhl-sg-en-8.0/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Iptables :&lt;BR /&gt;&lt;A href="http://www.europe.redhat.com/documentation/rhl8.0/rhl-rg-en-8.0/ch-iptables.php3" target="_blank"&gt;http://www.europe.redhat.com/documentation/rhl8.0/rhl-rg-en-8.0/ch-iptables.php3&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;see also &lt;BR /&gt;&lt;A href="http://www.iptables.org/documentation/index.html" target="_blank"&gt;http://www.iptables.org/documentation/index.html&lt;/A&gt;&lt;BR /&gt;the direct Iptables, with many things on routing, NAT and filtering.&lt;BR /&gt;&lt;BR /&gt;But do not hesitate to ask here too : it's often shorter to ask than to read pages and pages. Read to learn, ask to fix !&lt;BR /&gt;:]] We love points and are always ready to help...&lt;BR /&gt;&lt;BR /&gt;J</description>
    <pubDate>Tue, 17 Jun 2003 09:03:21 GMT</pubDate>
    <dc:creator>Jerome Henry</dc:creator>
    <dc:date>2003-06-17T09:03:21Z</dc:date>
    <item>
      <title>Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997920#M5147</link>
      <description>Is there a way I can setup my Webserver (IIS) under a firewall controlled by Linux.&lt;BR /&gt;&lt;BR /&gt;Scenario:&lt;BR /&gt;&lt;BR /&gt;I have a windows 2000 IIS server (192.168.XXX.XXX) connected to my internal network.  I setup a firewall using Linux, my web server can now access the internet using my Linux firewall as a gateway.  &lt;BR /&gt;&lt;BR /&gt;My problem: I want my internal web server to be accessed in the internet but has to pass through my firewall.  How do I do this?</description>
      <pubDate>Mon, 16 Jun 2003 04:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997920#M5147</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T04:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997921#M5148</link>
      <description>I'll assume your 'Firewall' box is a recent linux build and utilises 'iptables' for it's firewalling abilities.&lt;BR /&gt;&lt;BR /&gt;To do what you are asking, you need to set up a DNAT rule on the NAT table.&lt;BR /&gt;&lt;BR /&gt;Something similar to:&lt;BR /&gt;&lt;BR /&gt;iptables -A PREROUTING -p tcp -d &lt;EXTERNALIP&gt; --dport 80 -j DNAT --to 192.168.xxx.xxx:80&lt;BR /&gt;&lt;BR /&gt;This assumes two things:&lt;BR /&gt;&lt;BR /&gt;- You want external clients to access the web server via port 80, and you are not currently running a webserver on the firewall.&lt;BR /&gt;&lt;BR /&gt;- The internal webserver is listening on port 80, and can currently get out to the rest of the world invisibly.&lt;BR /&gt;&lt;BR /&gt;The PREROUTING rules on the NAT table allow you to chagne the destination of a given packet.  We say the destination is going to be the external IP of the firewall box (you could replace this '-d &amp;lt;&amp;gt;' with '-i &lt;EXT interface=""&gt;' instead) to say that external connections to port 80 will be redirected to the IP addrsess/port  (invisibly) on the internal network.&lt;BR /&gt;&lt;BR /&gt;If you aren't using iptables, let us know.&lt;BR /&gt;&lt;BR /&gt;NOTE: You can restrict this further by using a '-s &lt;IP&gt;' flag to say who is connecting to your web server..&lt;/IP&gt;&lt;/EXT&gt;&lt;/EXTERNALIP&gt;</description>
      <pubDate>Mon, 16 Jun 2003 05:06:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997921#M5148</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2003-06-16T05:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997922#M5149</link>
      <description>You must configure the linux firewall to pass all traffic on the needed ports to the IIS server inside the firewall.&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A PREROUTING -p tcp -d 15.15.15.15 -dport 80 -j DNAT --to-destination 10.0.0.25&lt;BR /&gt;&lt;BR /&gt;This assumes you are using iptables, I don't think you can do it with ipchains.  The second address 10.0.0.25 is the destination.  You will need to repeat that command for every port you wish to pass through the firewall.&lt;BR /&gt;&lt;BR /&gt;You'll also need to carefully test the overall iptables configuration.&lt;BR /&gt;&lt;BR /&gt;Source: Page 545-555 of Red Hat Linux 7.3 Bible&lt;BR /&gt;Christopher Negus&lt;BR /&gt;&lt;BR /&gt;I am doing this for my web hosting business.&lt;BR /&gt;&lt;BR /&gt;Regards, and Sucess.&lt;BR /&gt;&lt;BR /&gt;Sorry for the delay, itrc is doesn't want to post  my answers. Go figure.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 16 Jun 2003 05:36:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997922#M5149</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-06-16T05:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997923#M5150</link>
      <description>Thanks Stuart Steven,  Yes I am using iptables.  I am still learning how firewall works cause I used bastille to configure it for me.&lt;BR /&gt;&lt;BR /&gt;Excuse me for my ignorance but I am new to this ... where shall I put this commands? Do I just enter it at the terminal screen or do I need to edit a script of somekind.&lt;BR /&gt;&lt;BR /&gt;Another question ... will this work also if I put my e-mail server (POSTFIX for example) under my firewall?&lt;BR /&gt;&lt;BR /&gt;I will try this and will let you know of my success ... thanks again guys.  Your point to follow ... don't really know what to give at this moment ...</description>
      <pubDate>Mon, 16 Jun 2003 06:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997923#M5150</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T06:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997924#M5151</link>
      <description>you can run that command from the root shell, and it will take effect immediately on the firewall configuration. then you can save the whole iptables config using this:&lt;BR /&gt;&lt;BR /&gt;# iptables-save &amp;gt;/etc/iptables.config&lt;BR /&gt;&lt;BR /&gt;this command writes in /etc/iptables.config (example, you can put this in any file you like) the whole configuration; you can reload it so:&lt;BR /&gt;&lt;BR /&gt;# cat /etc/iptables.config | iptables-restore&lt;BR /&gt;&lt;BR /&gt;then you can put this line in /etc/rc.d/rc.local,&lt;BR /&gt;so the firewall config will be reloaded any time&lt;BR /&gt;you reboot your firewall machine.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Claudio</description>
      <pubDate>Mon, 16 Jun 2003 06:54:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997924#M5151</guid>
      <dc:creator>Claudio Cilloni</dc:creator>
      <dc:date>2003-06-16T06:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997925#M5152</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;I encountered the following error.  I checked the syntax and its correct.  I am using iptables version v1.2.7a.&lt;BR /&gt;&lt;BR /&gt;Error: iptables: No chain/target/match by that name&lt;BR /&gt;&lt;BR /&gt;Pls. help.</description>
      <pubDate>Mon, 16 Jun 2003 07:27:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997925#M5152</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T07:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997926#M5153</link>
      <description>Using the command as suggested by Steven I had the following errors. &lt;BR /&gt;&lt;BR /&gt;iptables v1.2.7a: multiple -d flags not allowed&lt;BR /&gt;&lt;BR /&gt;What can be wrong?</description>
      <pubDate>Mon, 16 Jun 2003 07:52:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997926#M5153</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T07:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997927#M5154</link>
      <description>it's missing a '-':&lt;BR /&gt;change '-dport' to '--dport'&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;CLaudio</description>
      <pubDate>Mon, 16 Jun 2003 07:59:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997927#M5154</guid>
      <dc:creator>Claudio Cilloni</dc:creator>
      <dc:date>2003-06-16T07:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997928#M5155</link>
      <description>I tried using the syntax of Steven and I tried accessing my internal web but it won't work.  What are the things I have to do to make it work.  How do I know I am using iptables instead of ipchains?</description>
      <pubDate>Mon, 16 Jun 2003 08:18:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997928#M5155</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T08:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997929#M5156</link>
      <description>It seems I have accidentally blocked port 80 on my firewall how do I undo this ?</description>
      <pubDate>Mon, 16 Jun 2003 08:30:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997929#M5156</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T08:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997930#M5157</link>
      <description>I have this entry on my iptables:&lt;BR /&gt;&lt;BR /&gt;-A INT_IN -p tcp -m tcp --dport 80 -j PAROLE&lt;BR /&gt;&lt;BR /&gt;what does this mean?</description>
      <pubDate>Mon, 16 Jun 2003 08:38:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997930#M5157</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997931#M5158</link>
      <description>I got port 80 to work again.  using &lt;BR /&gt;&lt;BR /&gt;iptables -A PUB_IN -p tcp -m tcp --dport 80 -j PAROLE&lt;BR /&gt;&lt;BR /&gt;My problem now is that my firewall does not route my port 80 to my internal web server (say 192.168.0.5 port 80 enabled)&lt;BR /&gt;&lt;BR /&gt;I tried to access my internal web using the internet by ex. &lt;A href="http://203.169.95.85:80" target="_blank"&gt;http://203.169.95.85:80&lt;/A&gt; but it does not work.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jun 2003 08:54:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997931#M5158</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T08:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997932#M5159</link>
      <description>I finally got Stuarts script working.  It needed the -t nat before the -A PREROUTING ....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Still my routing does not work.</description>
      <pubDate>Mon, 16 Jun 2003 09:06:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997932#M5159</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T09:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997933#M5160</link>
      <description>Last question.  How do can I test if my routing table is working?</description>
      <pubDate>Mon, 16 Jun 2003 09:55:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997933#M5160</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T09:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997934#M5161</link>
      <description>it could be useful for us if you show your firewall configuration, posting here the&lt;BR /&gt;output of the command iptables-save.&lt;BR /&gt;could you give also a brief description of you&lt;BR /&gt;network topology?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jun 2003 09:56:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997934#M5161</guid>
      <dc:creator>Claudio Cilloni</dc:creator>
      <dc:date>2003-06-16T09:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997935#M5162</link>
      <description>AH! idea:&lt;BR /&gt;&lt;BR /&gt;maybe the packet forwarding isn't enable in the firewall machine. run this (root):&lt;BR /&gt;&lt;BR /&gt;# echo "1" &amp;gt;/proc/sys/net/ipv4/ip_forward&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Claudio</description>
      <pubDate>Mon, 16 Jun 2003 09:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997935#M5162</guid>
      <dc:creator>Claudio Cilloni</dc:creator>
      <dc:date>2003-06-16T09:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997936#M5163</link>
      <description>I am using star topology.  Attached is my config.</description>
      <pubDate>Mon, 16 Jun 2003 10:03:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997936#M5163</guid>
      <dc:creator>Francis Ancheta</dc:creator>
      <dc:date>2003-06-16T10:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997937#M5164</link>
      <description>it seems that your external address is 203.131.104.188, not 203.169.95.85, according&lt;BR /&gt;to pre 'PREROUTING' rule.&lt;BR /&gt;if you point your browser to the first, it&lt;BR /&gt;should work.&lt;BR /&gt;&lt;BR /&gt;later i'll give a deeper look to your configuration.&lt;BR /&gt;&lt;BR /&gt;hi&lt;BR /&gt;Claudio&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jun 2003 10:14:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997937#M5164</guid>
      <dc:creator>Claudio Cilloni</dc:creator>
      <dc:date>2003-06-16T10:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997938#M5165</link>
      <description>I'm not so expert about iptables... I think that beginning from a clean firewall configuration could be a good idea to verify if NAT and packet routing to your inner web server works.&lt;BR /&gt;&lt;BR /&gt;# iptables -F&lt;BR /&gt;&lt;BR /&gt;flushes all your rules. you need also to set the default policy to 'ACCEPT' for all the chains:&lt;BR /&gt;&lt;BR /&gt;#iptables -P INPUT ACCEPT&lt;BR /&gt;#iptables -P OUTPUT ACCEPT&lt;BR /&gt;#iptables -P FORWARD ACCEPT&lt;BR /&gt;&lt;BR /&gt;then apply the rules suggested here. When (hope) it works, then you can add all the others rules (expecially security-related rules).&lt;BR /&gt;&lt;BR /&gt;hi&lt;BR /&gt;Claudio</description>
      <pubDate>Mon, 16 Jun 2003 11:25:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997938#M5165</guid>
      <dc:creator>Claudio Cilloni</dc:creator>
      <dc:date>2003-06-16T11:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Webserver under a firewall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997939#M5166</link>
      <description>As a reference I am providing my iptables configuration minus the additiona command posted above.&lt;BR /&gt;&lt;BR /&gt;iptables is very tricky and once you have it working, I recommend changing and adding very carefully, one thing at a time.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;REgards,&lt;BR /&gt;&lt;BR /&gt;Good Luck</description>
      <pubDate>Mon, 16 Jun 2003 15:02:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/webserver-under-a-firewall/m-p/2997939#M5166</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-06-16T15:02:55Z</dc:date>
    </item>
  </channel>
</rss>

