ipsec troubles
Hi everyone. I have two firewalls, internal and external. I have a vpn server in the middle on a routeable internet IP address. The remote vpn server is a rh9 linux box. When I make the local one a rh9 box, everything is great, however when the local one is an openbsd box, I get the following error in my firewall logs on my internal firewall. Does anyone know what it means.
Note: E.F.G.33 is a routeable internet IP address
Oct 15 14:53:43 radium kernel: FORWARD REJECT IN=eth1 OUT=eth0
SRC=E.F.G.33 DST=192.168.201.22 LEN=56 TOS=0x00 PREC=0x00 TTL=254 ID=25774 PROTO=ICMP TYPE=3 CODE=4 [SRC=192.168.201.22 DST=10.0.0.2 LEN=1500 TOS=0x00 PREC=0x00 TTL=126 ID=18062 DF PROTO=TCP INCOMPLETE [8 bytes] ] MTU=1444
Thanks,
Peter
Quoted 7 lines · Peter Marshall
Hi everyone. I have two firewalls, internal and external. I have a vpn server in the middle on a routeable internet IP address. The remote vpn server is a rh9 linux box. When I make the local one a rh9 box, everything is great, however when the local one is an openbsd box, I get the following error in my firewall logs on my internal firewall. Does anyone know what it means.
Quoted 7 lines
Note: E.F.G.33 is a routeable internet IP address
Oct 15 14:53:43 radium kernel: FORWARD REJECT IN=eth1 OUT=eth0SRC=E.F.G.33 DST=192.168.201.22 LEN=56 TOS=0x00 PREC=0x00 TTL=254 ID=25774 PROTO=ICMP TYPE=3 CODE=4 [SRC=192.168.201.22 DST=10.0.0.2 LEN=1500 TOS=0x00 PREC=0x00 TTL=126 ID=18062 DF PROTO=TCP INCOMPLETE [8 bytes] ] MTU=1444
ICMP Type 3 Code 4 = Destination Unreachable, Fragmentation Needed and Don't Fragment was Set.
lower the MTU (or MSS) of your IPSec traffic. you can do this with the "-j TCPMSS --set-mss X" target in iptables.
mathematically speaking, the maximum value of X in these situations would be 1440, derived as:
1500 (MTU of ethernet) - 20 (bytes in IPSec header) = 1480
MSS is defined as MTU - 40; or 1480 - 40 = 1440.
-j
Signature · 1 line
Jason Opperisano <[email protected]>
Thanks for the fast reply ...
So you are saying I should use a value of 1440 for X ?
What rule do I apply it too ? (sorry to sound stupid .. brain is fried .. have been working on this for a long time).
Peter
----- Original Message -----
From: "Jason Opperisano" <[email protected]>
To: <[email protected]>
Sent: Friday, October 15, 2004 3:10 PM
Subject: Re: ipsec troubles
Quoted 3 lines · Peter Marshall
Hi everyone. I have two firewalls, internal and external. I have a vpn server in the middle on a routeable internet IP address. The remote vpn server is a rh9 linux box. When I make the local one a rh9 box,
everything
Quoted 1 line
is great, however when the local one is an openbsd box, I get the
following
Quoted 1 line
error in my firewall logs on my internal firewall. Does anyone know what
it
Quoted 7 lines
means.
Note: E.F.G.33 is a routeable internet IP address
Oct 15 14:53:43 radium kernel: FORWARD REJECT IN=eth1 OUT=eth0SRC=E.F.G.33 DST=192.168.201.22 LEN=56 TOS=0x00 PREC=0x00 TTL=254 ID=25774 PROTO=ICMP TYPE=3 CODE=4 [SRC=192.168.201.22 DST=10.0.0.2
LEN=1500
Quoted 2 lines
TOS=0x00 PREC=0x00 TTL=126 ID=18062 DF PROTO=TCP INCOMPLETE [8 bytes] ] MTU=1444
ICMP Type 3 Code 4 = Destination Unreachable, Fragmentation Needed and Don't Fragment was Set.
lower the MTU (or MSS) of your IPSec traffic. you can do this with the "-j TCPMSS --set-mss X" target in iptables.
mathematically speaking, the maximum value of X in these situations would be 1440, derived as:
1500 (MTU of ethernet) - 20 (bytes in IPSec header) = 1480
MSS is defined as MTU - 40; or 1480 - 40 = 1440.
-j
Signature · 1 line
Jason Opperisano <[email protected]>
Quoted 7 lines · Peter Marshall
Thanks for the fast reply ...
So you are saying I should use a value of 1440 for X ?
What rule do I apply it too ? (sorry to sound stupid .. brain is fried .. have been working on this for a long time).Peter
you would add a new rule that matches your outbound VPN traffic...something along the lines of (this is 2.4 and *swan biased):
iptables -A FORWARD -i $INSIDE_IF -o $IPSEC_IF -p tcp --syn \
-j TCPMSS --set-mss 1440from my own personal experience--i use lower values than 1440, but 1440 is the mathematical maximum you can use...so that's your starting point.
-j
Signature · 1 line
Jason Opperisano <[email protected]>
Thank you again for the quick reply ... I am not sure if your suggestion will work though ... my vpn server is not on my firewall .. it is between my internal and external ... so basically, the troubling packets will come in through my external firewall, hit the vpnserver, leave the vpnserver and head to my internal firewall. They are then supposed to pass through to the server that has the webpage I am trying to get to, and then return the page back accross the vpn link to the remote server ....
I guess what I am getting at is there is no ipsec_if on the firewall ..as the vpn server is a standalone server ....
Peter
----- Original Message -----
From: "Jason Opperisano" <[email protected]>
To: <[email protected]>
Sent: Friday, October 15, 2004 3:44 PM
Subject: Re: ipsec troubles
Quoted 7 lines · Peter Marshall
Thanks for the fast reply ...
So you are saying I should use a value of 1440 for X ?
What rule do I apply it too ? (sorry to sound stupid .. brain is fried .. have been working on this for a long time).Peter
you would add a new rule that matches your outbound VPN traffic...something along the lines of (this is 2.4 and *swan biased):
iptables -A FORWARD -i $INSIDE_IF -o $IPSEC_IF -p tcp --syn \
-j TCPMSS --set-mss 1440from my own personal experience--i use lower values than 1440, but 1440 is the mathematical maximum you can use...so that's your starting point.
-j
Signature · 1 line
Jason Opperisano <[email protected]>
Quoted 8 lines · Peter Marshall
Thank you again for the quick reply ... I am not sure if your suggestion will work though ... my vpn server is not on my firewall .. it is between my internal and external ... so basically, the troubling packets will come in through my external firewall, hit the vpnserver, leave the vpnserver and head to my internal firewall. They are then supposed to pass through to the server that has the webpage I am trying to get to, and then return the page back accross the vpn link to the remote server ....
Quoted 4 lines
I guess what I am getting at is there is no
ipsec_ifon the firewall ..as the vpn server is a standalone server ....Peter
couple of things:
first--you only can control the packets that leave your network sent to the remote network. if they have a problem on their end as well--they need to fix it at their side...
that being said--find the last place in your network where packets destined for the remote VPN network are in the clear, and apply the TCPMSS rule there. if i'm understanding you correctly--this would be on your internal firewall and you would identify the packets by their destination network...maybe like:
iptables -A FORWARD -i $INSIDE_IF -o $OUTSIDE_IF -p tcp --syn \
-d $REMOTE_VPN_NET -j TCPMSS --set-mss 1440-j
Signature · 1 line
Jason Opperisano <[email protected]>