From: Ralf Spenneberg <lists@spenneberg.org>
To: jerome@gmanmi.tv
Cc: Netfilter <netfilter@lists.netfilter.org>
Subject: Re: iptables help..
Date: 10 Oct 2003 07:29:56 +0200 [thread overview]
Message-ID: <1065763796.1650.21.camel@kermit> (raw)
In-Reply-To: <200310101245.55993.jerome@gmanmi.tv>
Am Fre, 2003-10-10 um 06.45 schrieb JM:
> i want to access the http server on "remote server x" from LAN.. without going through the internet..
> so what i did is setup DNAT on "remote server A" but somehow its not working..
>
> this is my ruleset..
>
> NAT
> -A PREROUTING -d serverA_IP -p tcp -m tcp --sport 1024:65535 --dport 81 -j DNAT --to-destination serverx_IP:80
>
> FILTER
> -A INPUT -p tcp -s LAN_IP/24 --sport 1024:65535 -d serverA_IP --dport 81 -j LOG --log-prefix "INPUT packets:"
> -A FORWARD -d serverx_IP -p tcp -m tcp --sport 1024:65535 --dport 80 -m state --state NEW -j ACCEPT
> -A FORWARD -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
> -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A FORWARD -p tcp -j LOG --log-prefix "FORWARD packets:"
>
So how does it not work? What error messages do you see? Did you enable
routing on server_A? You probably want an SNAT rule too, because
otherwise server_X will try to answer directly to the LAN. That might
create problems doing conntrack on server_A and your Firewall protecting
the LAN.
Cheers,
Ralf
--
Ralf Spenneberg
RHCE, RHCX
Book: Intrusion Detection für Linux Server http://www.spenneberg.com
IPsec-Howto http://www.ipsec-howto.org
Honeynet Project Mirror: http://honeynet.spenneberg.org
next prev parent reply other threads:[~2003-10-10 5:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-10 4:45 iptables help JM
2003-10-10 5:29 ` Ralf Spenneberg [this message]
2003-10-13 3:12 ` JM
-- strict thread matches above, loose matches on Subject: below --
2004-12-15 23:09 IPTABLES HELP Burton
2004-12-15 23:17 ` Jason Opperisano
2004-11-04 2:40 iptables help Wei Ming Long
2004-11-04 21:02 ` Jason Opperisano
2004-11-04 22:39 ` Bosse Klykken
2004-07-28 23:20 Ashley M. Kirchner
2004-07-29 6:32 ` Antony Stone
2004-05-31 16:20 iptables Help Daniel Chemko
2004-05-31 10:36 Vinay Poojary
2003-10-13 3:04 iptables help George Vieira
2003-02-17 6:15 Laxman Gummadavally
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1065763796.1650.21.camel@kermit \
--to=lists@spenneberg.org \
--cc=jerome@gmanmi.tv \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox