<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=PT link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I’ve got a tunnel working ok started
from one machine on my internal network, and i can access the other side of the
tunnel and the other side can access my lan.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>But now I moved openswan to the machine
that has my internet interface, my home made router </span><span lang=EN-US
style='font-family:Wingdings'>J</span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The tunnel on this machine starts ok, but
when I try to access any machine on the other side of the tunnel, it doesn’t
work </span><span lang=EN-US style='font-family:Wingdings'>L</span><span
lang=EN-US> but the other side can still access my lan </span><span lang=EN-US
style='font-family:Wingdings'>L</span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I don’t know if its my iptables
rules, but its weird because if I start the tunnel on any other machine of my
lan it works fine </span><span lang=EN-US style='font-family:Wingdings'>L</span><span
lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I try to ping a machine on the other side
and it doesn’t do anything :<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US># ping 10.112.32.78<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>PING 10.112.32.78 (10.112.32.78) 56(84)
bytes of data.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>…<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Here are my iptables rules:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>eth0 - LAN<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>eth3 – WAN<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>ipsec0 – ipsec tunnel<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US># Firewall configuration written by
system-config-firewall<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US># Manual customization of this file is not
recommended.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>*nat<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>:PREROUTING ACCEPT [0:0]<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>:OUTPUT ACCEPT [0:0]<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>:POSTROUTING ACCEPT [0:0]<o:p></o:p></span></p>
<p class=MsoNormal>-A POSTROUTING -o eth3 -j MASQUERADE<o:p></o:p></p>
<p class=MsoNormal>-A POSTROUTING -o ipsec0 -j MASQUERADE<o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US>-A PREROUTING -i eth3 -p tcp -m tcp -m
multiport --dports 25,80,443,465,993,1194,3000 -j DNAT --to-destination
192.168.2.253<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A PREROUTING -i eth3 -p udp -m udp -m
multiport --dports 1194 -j DNAT --to-destination 192.168.2.253<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>COMMIT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>*filter<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>:INPUT ACCEPT [0:0]<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>:FORWARD ACCEPT [0:0]<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>:OUTPUT ACCEPT [0:0]<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -m state --state
ESTABLISHED,RELATED -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -p icmp -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -i lo -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -p ah -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -p esp -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -i eth0 -m state --state NEW -m
tcp -p tcp -m multiport --dports 22,902,3260,5901,9222,9333 -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -i eth0 -m state --state NEW -m
udp -p udp -m multiport --dports 161,162,177 -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -i eth3 -m state --state NEW -m
tcp -p tcp -m multiport --dports 25,465,993,1194,3000 -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -i eth3 -m state --state NEW -m
udp -p udp -m multiport --dports 1194 -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -m state --state
ESTABLISHED,RELATED -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -p ah -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -p esp -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -p icmp -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -i lo -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -o eth3 -j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -i eth3 -m state --state NEW -m
tcp -p tcp -d 192.168.2.253 -m multiport --dports 25,80,443,465,993,1194,3000
-j ACCEPT<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -i eth3 -m state --state NEW -m
udp -p udp -d 192.168.2.253 -m multiport --dports 1194<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A INPUT -j REJECT --reject-with
icmp-host-prohibited<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>-A FORWARD -j REJECT --reject-with
icmp-host-prohibited<o:p></o:p></span></p>
<p class=MsoNormal>COMMIT<o:p></o:p></p>
</div>
</body>
</html>