Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to set up a web server which would face the outside but also the internal network and work as a router for the internal network at the same time. The NAT and server from the outside work fine, but I cannot access the web server from the internal network (addresses 192.168.1.0/24). The server lan interface is 192.168.1.1. I cannot find the problem. I tried to set up iptables logging but did not find anything useful. Bearing in mind that I am a linux newbie, can you spot any problem in my iptables script? Much appreciated.
===================Here is the script I invoke to start iptables.
#iptables firewall script for sharing
#broadband Internet, with no public services
Well, from what I can see, I think you might be missing a rule to allow a connection from within the LAN to connect to the interface that is in the LAN on your webserver/router. Something to the effect of:
$ipt -A INPUT -s 192.168.1.0/24 -d 192.168.1.1 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
Now that's off the top of my head, so you might need to adjust that line above by adding specific port(s) and/or interface, but it should be something like that, if memory serves correctly.
HTH. Let us know.
Last edited by ShadowCat8; 06-28-2012 at 01:36 PM.