Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Rowan Reid <rreid@studio3arc.com>
To: netfilter@lists.netfilter.org
Subject: Getting Netfilter to play nice.
Date: Mon, 24 Mar 2003 10:50:21 -0800	[thread overview]
Message-ID: <000201c2f236$391b9560$1001a8c0@s3ac> (raw)
In-Reply-To: <3E7F2C5B.9040601@giganet.cz>




I'm setting up a freeswan vpn, or well trying. One important step is to
get freeswan to play nice.

Here are the free swan req.
<SNIPPET>
IKE uses the UDP protocol and port 500. 
Unless you are using only (less secure, not recommended) manual keying,
you need IKE to negotiate connection parameters, acceptable algorithms,
key sizes and key setup. IKE handles everything required to set up,
rekey, repair or tear down IPsec connections. 
ESP is protocol number 50 
This is required for encrypted connections. 
AH is protocol number 51 
This can be used where only authentication, not encryption, is required.

</SNIpPET>
It also mentions not masquarading packates destined to the vpn network.
My rulesets that apply arre posted below

<snippet>
# VPN - Enable the following lines to allow incomming VPN connections
#
echo -e "      - Allowing EXTERNAL access for VPN traffic"
$IPTABLES -A INPUT -i $EXTIF -m state --state NEW,ESTABLISHED,RELATED -p
udp -s $INGLEWOOD -d $EXTIP --dport 500 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -m state --state NEW,ESTABLISHED,RELATED -p
esp -s $INGLEWOOD -d $EXTIP -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -m state --state NEW,ESTABLISHED,RELATED -p
ah -s $INGLEWOOD -d $EXTIP -j ACCEPT

echo "     - FWD: Allow all connections OUT and only existing/related
IN"
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state
ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state
NEW,ESTABLISHED,RELATED -s $INGLEWOOD -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

$IPTABLES -t nat -A POSTROUTING -o $EXTIF ! -d 10.0.0.0/24 -j SNAT --to
$EXTIP
</snippet>

Where 10.0.0.0 is the net of the private address of the other end of the
vpn.
Have I covered all my bases ?




      reply	other threads:[~2003-03-24 18:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19  3:01 Why want my iptables scripts run in cron david
2003-03-24 16:03 ` Ales Stibal
2003-03-24 18:50   ` Rowan Reid [this message]

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='000201c2f236$391b9560$1001a8c0@s3ac' \
    --to=rreid@studio3arc.com \
    --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