From: "Rob Sterenborg (lists)" <lists@sterenborg.info>
To: J Webster <jw.jwebster@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: masquerade error
Date: Fri, 14 Oct 2011 10:55:36 +0200 [thread overview]
Message-ID: <1318582536.3179.5.camel@ns014530.dcyb.net> (raw)
In-Reply-To: <4E97E602.3000809@gmail.com>
On Fri, 2011-10-14 at 08:34 +0100, J Webster wrote:
> The hosting company have told me that masquerade is not activated:
>
> MASQUERADE target isn\'t activate on your VPS.
> You can use SNAT or DNAT target in nat tables.
>
> So, how can I use SNAT and DNAT to route the traffic to my OpenVPN?
-j SNAT --to-source <internet_ip>
-j DNAT --to-destination <internal_ip>
Please check the SNAT and DNAT targets with 'man iptables' for the
details.
--
Rob
> [root@vps8259 myscripts]# echo 1> /proc/sys/net/ipv4/ip_forward
> [root@vps8259 myscripts]# iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
> [root@vps8259 myscripts]# iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
> [root@vps8259 openvpn]# iptables -A FORWARD -s 172.16.0.0/24 -j ACCEPT
> [root@vps8259 openvpn]# iptables -A FORWARD -j REJECT
> [root@vps8259 openvpn]# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE
> iptables: Unknown error 4294967295
> [root@vps8259 openvpn]# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE
> iptables: Unknown error 4294967295
>
>
>
>
> On 12/10/11 19:18, J Webster wrote:
> >> The problem here may be venet0 interface. As far as I know, there is no
> >> support for "nat" tables on OpenVZ virtual network interfaces.
> >
> > Thanks. If that is the case, then how do I postroute on a virtual
> > network?
> >
> > [root@vps8259 openvpn]# iptables -t nat -A POSTROUTING -s
> > 10.8.0.0/24 -o venet0 -j MASQUERADE
> > iptables: Unknown error 4294967295
> > [root@vps8259 openvpn]# iptables -t nat -A POSTROUTING -s
> > 10.8.0.0/24 -o venet0 -j MASQUERADE
> > iptables: Unknown error 4294967295
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-10-14 8:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 7:01 masquerade error J Webster
2011-10-11 13:31 ` Jan Sarenik
2011-10-11 13:43 ` J Webster
2011-10-12 18:18 ` J Webster
2011-10-13 14:09 ` Jan Sarenik
2011-10-14 7:34 ` J Webster
2011-10-14 8:55 ` Rob Sterenborg (lists) [this message]
2011-10-14 9:05 ` Rob Sterenborg (lists)
[not found] ` <4E980738.5040202@googlemail.com>
2011-10-14 9:57 ` J Webster
2011-10-14 10:27 ` Rob Sterenborg (lists)
2011-10-14 11:45 ` J Webster
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=1318582536.3179.5.camel@ns014530.dcyb.net \
--to=lists@sterenborg.info \
--cc=jw.jwebster@gmail.com \
--cc=netfilter@vger.kernel.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