"David Cutting" <(E-Mail Removed)> schreef in bericht
news:c1qsk9$scs$1$(E-Mail Removed)...
> "Chandler Bing" <(E-Mail Removed)> wrote in message
> news:4040c189$0$42497$(E-Mail Removed)...
> > Hi,
> >
> > I'm a bit messing around with iptables, and it going very well. My
> > firewallsctipt already has 700 rules. There's only 1 thing that isn't
> > working right. On the same pc where the firewall is working, is apache
> > listening on port 80. The problem is that i can't access my webserver on
> my
> > external ip adress from my local network. The apache configuration is
> fine,
> > my friends can access it and connecting the webserver from behind an
> > external proxyserver is also working well. Are there any rules to make
my
> > script complete, so i can acces the webserver from the lan on my
external
> > ip?
>
> Hi there,
>
> I would /think/ (haven't ever tested it) that something like
> this should work:
>
> iptables -t nat -A PREROUTING -s 10.0.0.0/24 -d 1.2.3.4/32 -p tcp
> --dport 80 -j DNAT --to 1.2.3.4:80
>
> iptables -t nat -A POSTROUTING -o eth0 -p tcp -s 10.0.0.0/24
> -d 1.2.3.4 --dport 80 -j MASQUERADE
>
> Where 10.0.0.0/24 is your local LAN and Subnet and
> 1.2.3.4 is your external IP address.
>
> HTH, Cheers,
>
> Dave.
>
hi,
i've tried your rules in my firewall, but i still can't acces my webserver
from inside. Are you sure these rules are right? Thanks anyway for the
reply...
byebye, michael
|