Networking Forums

Networking Forums > Computer Networking > Linux Networking > Firewall and Webserver

Reply
Thread Tools Display Modes

Firewall and Webserver

 
 
Scott Hadfield
Guest
Posts: n/a

 
      09-19-2003, 11:34 PM
I'm having an interesting problem between my firewall and webserver
right now and I'm hoping some one can explain the reason for why it's
happening.

Both my firewall and webserver are currently connected directly to the
internet as well as an internal network. I want to do some testing with
my firewall before putting it between my webserver and the internet. I
set up iptables to foward all www packets to my webserver's internal IP
192.168.0.1. So, from the internet I should be able to connect to my
webserver using either my webserver's IP or my firewall's IP. For some
reason I can't connect to it via my firewall. However, if I bring down
eth0, my external network card on the webserver, so that it's only
connected to the internal network, I can suddenly access my webserver
via the firewall. Can anyone explain why this might be happening?

I have one other similar, but perhaps unrelated, problem with my
firewall. When I set my firewall to forward SSH packets to a machine on
my internal network I have no problems SSHing through my firewall to
that machine from another machine, either internal or external. But when
I try SSHing from that machine (the machine which SSH is being forwarded
to) to the firewall, it fails. In essence what I'm trying to do is SSH
to myself, with the firewall in the middle. Can anyone explain this
problem to me?

Thanks,
Scott

 
Reply With Quote
 
 
 
 
Jeroen Geilman
Guest
Posts: n/a

 
      09-20-2003, 12:04 PM
Scott Hadfield wrote:

> I'm having an interesting problem between my firewall and webserver
> right now and I'm hoping some one can explain the reason for why it's
> happening.
>
> Both my firewall and webserver are currently connected directly to the
> internet as well as an internal network. I want to do some testing with
> my firewall before putting it between my webserver and the internet. I
> set up iptables to foward all www packets to my webserver's internal IP
> 192.168.0.1. So, from the internet I should be able to connect to my
> webserver using either my webserver's IP or my firewall's IP. For some
> reason I can't connect to it via my firewall. However, if I bring down
> eth0, my external network card on the webserver, so that it's only
> connected to the internal network, I can suddenly access my webserver
> via the firewall. Can anyone explain why this might be happening?


Investigate.

Scrutinise the firewall logs; if these are not helpful then add MARK and LOG
rules to the relevant chains.

Read the webserver logs carefully - do the requests even get there, or is it
the firewall that stops them ?

It does not appear to be the firewall, since you say it works when you
disconnect the webserver from the Internet.

Do you use apache ? If so, read the documentation on Listen and Bind
directives - twice.

Do you use virtual servers ? Same as above, but read them three times...

You give next to no actual information, without which it is very hard to
offer more relevant help in your situation.

It is by no means an uncommon situation, but it is always *unique*.
People tend to forget that.

Plus, you can configure iptables in more ways than there are stars in the
sky - don't expect us to know which method you used...

> I have one other similar, but perhaps unrelated, problem with my
> firewall. When I set my firewall to forward SSH packets to a machine on
> my internal network I have no problems SSHing through my firewall to
> that machine from another machine, either internal or external.


Which are not at all the same: one goes though the firewall, the other
doesn't.
Take care of not thinking your firewall controls everything - it doesn't.

> But when
> I try SSHing from that machine (the machine which SSH is being forwarded
> to) to the firewall, it fails. In essence what I'm trying to do is SSH
> to myself, with the firewall in the middle. Can anyone explain this
> problem to me?


Not really, it would be nice if you could explain the problem ;-)

And post *data*, not what you think is the problem!

--
Jeroen Geilman

Gentoo 1.4 rc4
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
home server - router, firewall, webserver, email? Bill Linux Networking 8 12-06-2006 06:58 PM
Mapping TCP Port 80 To A Second Webserver Behind Firewall Kevin Broadband Hardware 1 01-13-2005 07:07 PM
WebServer behind firewall Paul MacFarlane Windows Networking 7 12-15-2004 01:51 AM
Firewall & Webserver Newbie Curt Broadband Hardware 0 03-07-2004 03:59 PM
webserver behind firewall Rigamonk Linux Networking 0 08-01-2003 01:40 AM



1 2 3 4 5 6 7 8 9 10 11