Solved

IPSEC Lan to Lan IPTABLES configuration requirements

Posted on 2006-06-15
10
818 Views
Last Modified: 2012-05-05

I have configured and established a working IPSEC net to net connection using the following instructions

http://www.centos.org/docs/4/html/rhel-sg-en-4/s1-ipsec-net2net.html

I can ping from any host on either network to host on either network without problems.

My next challenge is configuring a secure firewall that blocks ALL traffic coming in, allows traffic going out using NAT and allows all traffic to come in and out through the IPSEC links on either network without iptables blocking it.

I have been trying to figure this out with no avail.

If someone could give me the specific iptables commands I could type in,  I'll just type them in manually or possibly add them to a script.   I can find plenty of guides for setting up a good firewall for the average home user but none that assist with net to net connections using ipsec and iptables.


Thanks in advance!

-Will


0
Comment
Question by:williamjnelson
  • 5
  • 5
10 Comments
 

Author Comment

by:williamjnelson
ID: 16918222
This one I'm missing the boat on!  Any help would do...
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16919173
which kernel are you using, 2.4 or 2.6?
0
 

Author Comment

by:williamjnelson
ID: 16927336
2.6
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 16928918
IIRC you cannot do it with iptables in 2.6 'cause the definition and use of virtual interfaces has changed.
You need to install additional software like iproute2 http://www.lartc.org/.

AFAIK there're patches and workarounds for that, but don't have a link handy, sorry.
0
 

Author Comment

by:williamjnelson
ID: 16988884
I have not tried this but, what do you think about allowing in from iptables data on port 500 and blocking everything else on the internet interface?

Would that work?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 16990043
if you only allow port 500 and protocol 50 then you have IPSec only, that should work 'cause you don't need to destinguish different routes
0
 

Author Comment

by:williamjnelson
ID: 16997043
I have not yet tried it, but I think thats the working solution for this problem.

The next cool thing would be to have each ipsec connection show up as a virtual interface in ifconfig kind of like a vlan or alias ip on an eth0 interface.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16998871
> .. to have each ipsec connection show up as a virtual interface
that's what I said is not possible with 2.6, at least very difficult to configure

If your linux box is just used as firewall/router/gateway/proxy, then you better use 2.4.
0
 

Author Comment

by:williamjnelson
ID: 17003714
does 2.4 show the interfaces?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17003819
in 2.4 iptables can bind rules to all interfaces, even virtual ones, in 2.6 only physical ones can be used
With IPSec you get a (virtual) ipsec interface which can not simply be used with iptables.
IIRC there was a kernal patch (at least for early 2.6 kernels), which could be used together with iproute2 to get it working again. I don't know the current status of this behaviour ...
Sorry, don't have the links handy.
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Getting Ubuntu Linux Console to show boot beyond error notification 5 89
Webmin Bandwidth Monitoring not working 10 166
AIX    Volume group Auto ON/OFF question 2 127
Cron jobs 12 140
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question