This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Web server in internal network

All right, I want to run a web server on a machine in the internal network that is accessible from the outside. (I've already got one that runs in the DMZ, and the rule for this one will be turned on and off as needed) I want all of the traffic that comes in on port 80 to be directed to my DMZ server, and that is already set up and working. 

For the internal server, then, I want to use a port like 8080. I've set up a new service named "Internal Web":
"Internal Web"  TCP  1024:65536  8080  "static"

 I've added the internal server to the hosts.

 I've added the NAT rule:
"Internal Web Server"  ::no match::->External(address) / Internal Web  none  /HTTP

And I've set up the Packet Filter rule:
  Any  Internal Web  Allow  

But I still get a "cannot find server" error when I tell the browser to go to "http://:8080". Any suggestions on what I'm missing, etc? (And yes, I do have the web server running on the internal server)


This thread was automatically locked due to age.
Parents
  • ok dude - here it comes

    [ QUOTE ]

     I've added the NAT rule:
    "Internal Web Server"  ::no match::->External(address) / Internal Web  none  /HTTP


    [/ QUOTE ]

    so if i understand this right - your internal server is listening to port 80 and you'll do a destination port translation, what means a packet from outside to port 8080 should be forwarded to the internal server on port 80, right?

    so you have already added the rule

    Any  Internal Web  Allow  

    but what about 

    Any http Allow  (for the destination port translation ;-) )

    think this should fix your problem.

    but hey dude, if you're running an apache in your dmz, one can add  a vhost with proxy so that your internal server could be reached on port 80, too. (you can run more server on one ip and one port)
  • Okay, i'm confused...

    I added this rule:
    Any http Allow  


    And, yes, i already have a service defined. See original post.

    In the Packet Filter section, but still no luck. It sounds like you're saying something about the NAT rule, but it doesn't fit into your post...
  • Does your NAT rule match on 8080 inbound?
  •  0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0                   tcp spts:1024:65535 dpt:8080
  • You need a DNAT that says

    {Firewall External Interface IP}:8080 =--> {Internal Web Server IP}:HTTP (or 80)

    Is that a packetfilter rule you're reading off?

    Packetfiltering happens after the address (and port...) translation; the packetfilter ruile could be:

    Source_Net=Any, Destination_Service=HTTP, Destination_Net=Internal Web Server
  • [ QUOTE ]
     the packetfilter ruile could be:

    Source_Net=Any, Destination_Service=HTTP, Destination_Net=Internal Web Server
     

    [/ QUOTE ]

    istn't this that what i've said above  [;)]
  • Yes you did; it still sounds like his DNAT rule isn't right...
  • he wants to forward port 8080 to 80 . and the dnat->rules looks ok but
     just an idea-> could there be a conflict with squid [:S]
  • (Everything copied and pasted directly from WebAdmin)

    Okay, NAT rule is:
    Internal Web Server   All -> External (Address) / Internal Web   None   Melian / HTTP 

    Service Definition:
    Internal Web  TCP  1024:65535  8080  static  

    Packet Filter:
     External -> Internal    Any  0.0.0.0/0   Internal Web           [none]

    It looks to me like that DNAT and Packet Filter rules are exactly how both of you have described them to me. What am I missing?

    EDIT: Ah, crap! Should the Packet Filter rule have HTTP instead of my "Internal Web" as the Service?


    And BTW, thanks a lot to both of you for continually trying to give me a hand. I really appreciate it. The firewall stuff is fairly new to me, and none of my friends use Astaro, so I'm sort of out on my own!  [:)]

    -MotH
  • [ QUOTE ]

    EDIT: Ah, crap! Should the Packet Filter rule have HTTP instead of my "Internal Web" as the Service?
     

    [/ QUOTE ]

    if you do a destination port translation from 8080 -> 80 than you'll need to allow port 80 to your internal server.

    but try the whole story with anonther port than 8080. (just for tests)
Reply
  • [ QUOTE ]

    EDIT: Ah, crap! Should the Packet Filter rule have HTTP instead of my "Internal Web" as the Service?
     

    [/ QUOTE ]

    if you do a destination port translation from 8080 -> 80 than you'll need to allow port 80 to your internal server.

    but try the whole story with anonther port than 8080. (just for tests)
Children