Linux Netfilter discussions
 help / color / mirror / Atom feed
From: mathieu <mathieu@infolibre.net>
To: netfilter@vger.kernel.org
Subject: Re: VPN client from behind a firewall
Date: Mon, 16 Jun 2008 14:09:59 +0200	[thread overview]
Message-ID: <48565817.2040600@infolibre.net> (raw)
In-Reply-To: <90d975d30806160444t7c9bbf21if9b0062e2e72ac56@mail.gmail.com>

Hi,

	You need to authorize traffic and masquerade/SNAT connections and allow 
forwarding.

Authorize :

iptables -A FORWARD -i eth1 -p udp -d $VPN_SERVER_IP -s 
$INTERNAL_CLIENT_IP --dport 500 -m state NEW, ESTABLISHED -j ACCEPT

iptables -A FORWARD -i eth0 -p udp -s $VPN_SERVER_IP -d 
$INTERNAL_CLIENT_IP --sport 500 -m state ESTABLISHED -j ACCEPT

SNAT (change internal adress by a public one) :

iptables -t nat -A POSTROUTING -o eth0 -p udp -d $VPN_SERVER_IP --dport 
  500 -j SNAT --to-source $PUB_IP

It's look like udp port 4500 and 10000 are also used. And Client must be 
a SecureNat one (i can't confirm, i'm not using cisco VPN).

Regards,

m.e.

Gergely Buday a écrit :
> Dear All,
> 
> I would like to use a Cisco VPN client from behind my CentOS server,
> which has an iptables firewall. The network topology is as follows:
> eth0 is towards the ISP, eth1 heads the local clients. Up to now I
> used
> 
> http://tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html#RC.FIREWALL-IPTABLES
> 
> but this clearly needs extension. What I know is that I should allow
> the IPSec port (500) to be open. What else, and how? I'm not very
> familiar with iptables, so some pointers would be more than welcome.
> 
> Best Wishes
> 
> - Gergely
> --
> 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


  reply	other threads:[~2008-06-16 12:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 11:44 VPN client from behind a firewall Gergely Buday
2008-06-16 12:09 ` mathieu [this message]
2008-06-16 15:21   ` Jan Engelhardt
2008-06-24  8:36     ` Gergely Buday
2008-06-24  8:58       ` Jan Engelhardt
2008-06-24 10:14         ` Gergely Buday

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=48565817.2040600@infolibre.net \
    --to=mathieu@infolibre.net \
    --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