From: Jim Laurino <nfcan.x.jimlaur@dfgh.net>
To: netfilter@lists.netfilter.org
Subject: Re: Port forwarding not working (nfcan: to exclusive) (nfcan: to exclusive)
Date: Sun, 29 Apr 2007 03:10:13 -0400 [thread overview]
Message-ID: <1177830613l.3596l.1l@soapy> (raw)
In-Reply-To: <1077.70.240.185.92.1177822593.squirrel@ssl.jammconsulting.com> (from +nfcan+jimlaur+ce6b708e36.neil#JAMMConsulting.com@spamgourmet.com on Sun Apr 29 00:56:33 2007)
On 04/29/2007 12:56:33 AM, neil@JAMMConsulting.com wrote:
> Jim:
>
> > The outside should be able to initiate
> > so the first rule looks good:
> >
> > /sbin/iptables -A FORWARD -i eth0 -o eth1 -d $LINKSYS_VPN_IP
> > -p tcp --sport 1024: --dport 1723
> > -m state --state NEW,ESTABLISHED -j ACCEPT
> >
> > But you need to accept the return packets.
> > How about this for the return pattern:
> >
> > /sbin/iptables -A FORWARD -i eth1 -o eth0 -s $LINKSYS_VPN_IP
> > -p tcp --sport 1723
> > -m state --state ESTABLISHED -j ACCEPT
>
> That is my point. Without this rule, I should see packets
> hitting the firewall in the log. I dont see them.
I guess "hitting the firewall" means showing up in a drop count.
I agree, if the packets come in they should be counted.
But you do need some rule to accept them in filter.
If the packets do not come back, maybe that is a routing problem?
I can also imagine that a vpn box might not want to talk to hosts
not on the local network it was hooked up to.
Some security folks might get upset :)
Maybe you could use SNAT to make the packets appear
to come from the firewall, then they ought to come back.
I think that is a better use of the postrouting chain.
The mantra is always "filter in filter", etc.,
and my experience has been that it is good advice.
> I can add this rule, but I don't think the return packets are
> coming back correctly.
I think a sniffer, e.g. wireshark (ex ethereal), would
be able to tell you if there were loose packets
floating around on the eth1 side trying to get somewhere else.
You could filter on tcp and source ip:port
and see what the destination was.
If the packets were destined for the outside originator,
would the firewall route them there?
>
> > The accept in the nat postrouting can be removed.
>
> I need that as I also set the nat postrouting to drop
> by default.
see above, not recommended
--
Jim Laurino
nfcan.x.jimlaur@dfgh.net
Please reply to the list.
Only mail from the listserver reaches this address.
next prev parent reply other threads:[~2007-04-29 7:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-29 3:15 Port forwarding not working Neil Aggarwal
2007-04-29 4:04 ` Port forwarding not working (nfcan: to exclusive) Jim Laurino
2007-04-29 4:56 ` neil
2007-04-29 7:10 ` Jim Laurino [this message]
2007-04-29 13:06 ` Port forwarding not working (nfcan: to exclusive) " Neil Aggarwal
2007-04-29 13:29 ` Jan Engelhardt
2007-04-29 14:39 ` Port forwarding not working Jim Laurino
2007-04-30 2:11 ` Neil Aggarwal
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=1177830613l.3596l.1l@soapy \
--to=nfcan.x.jimlaur@dfgh.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.