Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-31-2005, 07:25 AM   #1
LQ Newbie
Registered: Mar 2005
Location: Pakistan
Posts: 3

Rep: Reputation: 0
iptables and VPN connections


Does someone have to set iptables to accept VPN connections or they are handled by kernel routing automatically?
Old 04-02-2005, 04:19 AM   #2
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
vpn's are run over layer 3 - in that case they most likley will need to pass through iptables!
(that's what i think!)
Old 04-05-2005, 10:43 AM   #3
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32

yes you definitely have to.

There's a trick since when you, as an exemple, tunnel port http 80, your Linux box will first see an ESP packet ; then your vpn software will decrypt traffic, and the Linux box will see an incomming http packet. Best way to see what's happening is to play a bit with ethereal.

Thus, so as to allow http incomming through vpn, you need both
iptables -A INPUT -i eth0 -p esp -j ACCEPT
iptables -A INPUT -i eth0 -p tcp -dport 80 -j ACCEPT
But the second line is quite uncool !! So here's the trick :
iptables -A INPUT -i eth0 -p esp -j ACCEPT
iptables -t mangle -I INPUT -p esp -j MARK --set-mark 1
iptables -I FORWARD -m mark --mark 1 -j ACCEPT
0 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vpn Multiple connections rdwiljam Linux - Networking 0 09-29-2005 05:43 PM
Linux VPN Connections Limit lucifercipher Linux - Networking 1 04-03-2005 08:58 AM
Routing VPN Connections speed_viper Linux - Networking 1 03-29-2005 05:24 PM
Multiple simultaneous VPN connections? chamitha Linux - Networking 3 08-29-2002 01:28 AM
VPN Connections itguy Linux - Security 2 05-02-2002 04:10 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration