Hello, <br><br>I am running FC5 on my router. I have feeling the I am missing some thing really simple btu now I am ready to pull my hairs if I don't get the solution.... At this point my first target to setup my Linux box as a router and my machines behind the router with Public IP should be available to the outside world. Below are my configuration.
<br><br>[root@bser2 sysconfig]# iptables -L -n -v<br>Chain INPUT (policy DROP 0 packets, 0 bytes)<br> pkts bytes target prot opt in out source destination<br> 4 336 ACCEPT icmp -- * *
<a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://0.0.0.0/0">0.0.0.0/0</a><br> 45 3944 ACCEPT tcp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://216.209.3.192/26">
216.209.3.192/26</a> tcp dpts:6000:65535<br> 0 0 ACCEPT udp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://216.209.3.192/26">216.209.3.192/26</a> udp dpts:2048:5799
<br> 0 0 ACCEPT udp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://216.209.3.192/26">216.209.3.192/26</a> udp dpts:6000:65535<br> 0 0 ACCEPT udp -- * *
<a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://216.209.3.192/26">216.209.3.192/26</a> udp dpt:53<br> 0 0 ACCEPT udp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a>
<a href="http://192.168.2.0/24">192.168.2.0/24</a> udp dpt:53<br> 0 0 ACCEPT tcp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://216.209.3.192/26">216.209.3.192/26</a>
tcp dpt:53<br> 0 0 ACCEPT tcp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://192.168.2.0/24">192.168.2.0/24</a> tcp dpt:53<br> 0 0 ACCEPT tcp -- * *
<a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://216.209.3.192/26">216.209.3.192/26</a> tcp dpt:80<br> 0 0 ACCEPT tcp -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a>
<a href="http://216.209.3.192/26">216.209.3.192/26</a> tcp dpt:443<br> 0 0 ACCEPT all -- * * <a href="http://216.209.3.192/26">216.209.3.192/26</a> <a href="http://0.0.0.0/0">0.0.0.0/0</a><br>
0 0 ACCEPT all -- * * <a href="http://216.209.3.192/26">216.209.3.192/26</a> <a href="http://216.209.3.192/26">216.209.3.192/26</a><br> 0 0 ACCEPT all -- * * <a href="http://192.168.2.0/24">
192.168.2.0/24</a> <a href="http://192.168.2.0/24">192.168.2.0/24</a><br> 0 0 ACCEPT all -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://255.255.255.255">255.255.255.255
</a><br> 0 0 ACCEPT all -- lo * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://0.0.0.0/0">0.0.0.0/0</a><br><br>Chain FORWARD (policy DROP 0 packets, 0 bytes)<br> pkts bytes target prot opt in out source destination
<br> 0 0 ACCEPT all -- eth0 eth1 <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://0.0.0.0/0">0.0.0.0/0</a><br> 0 0 ACCEPT all -- eth1 eth0 <a href="http://0.0.0.0/0">
0.0.0.0/0</a> <a href="http://0.0.0.0/0">0.0.0.0/0</a><br><br>Chain OUTPUT (policy ACCEPT 50 packets, 5644 bytes)<br> pkts bytes target prot opt in out source destination<br><br>Chain spoof (0 references)
<br> pkts bytes target prot opt in out source destination<br> 0 0 LOG all -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://0.0.0.0/0">0.0.0.0/0
</a> limit: avg 5/min burst 5 LOG flags 0 level 4 prefix `Spoofing: '<br> 0 0 DROP all -- * * <a href="http://0.0.0.0/0">0.0.0.0/0</a> <a href="http://0.0.0.0/0">0.0.0.0/0
</a><br>[root@bser2 sysconfig]#<br>[root@bser2 sysconfig]# ifconfig eth0<br>eth0 Link encap:Ethernet HWaddr 00:15:C5:EB:68:D0<br> inet addr:<a href="http://216.209.3.212">216.209.3.212</a> Bcast:<a href="http://216.209.3.223">
216.209.3.223</a> Mask:<a href="http://255.255.255.224">255.255.255.224</a><br> inet6 addr: fe80::215:c5ff:feeb:68d0/64 Scope:Link<br> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br> RX packets:23087 errors:0 dropped:0 overruns:0 frame:0
<br> TX packets:21531 errors:0 dropped:0 overruns:0 carrier:0<br> collisions:0 txqueuelen:1000<br> RX bytes:2280064 (2.1 MiB) TX bytes:5351240 (5.1 MiB)<br> Interrupt:16 Memory:f4000000-f4011100
<br><br>[root@bser2 sysconfig]# ifconfig eth1<br>eth1 Link encap:Ethernet HWaddr 00:15:C5:EB:68:CE<br> inet addr:<a href="http://216.209.3.225">216.209.3.225</a> Bcast:<a href="http://216.209.3.239">216.209.3.239
</a> Mask:<a href="http://255.255.255.240">255.255.255.240</a><br> inet6 addr: fe80::215:c5ff:feeb:68ce/64 Scope:Link<br> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br> RX packets:6479 errors:0 dropped:0 overruns:0 frame:0
<br> TX packets:8083 errors:0 dropped:0 overruns:0 carrier:0<br> collisions:0 txqueuelen:1000<br> RX bytes:3309716 (3.1 MiB) TX bytes:612572 (598.2 KiB)<br> Interrupt:16 Memory:f8000000-f8011100
<br><br>[root@bser2 sysconfig]# route<br>Kernel IP routing table<br>Destination Gateway Genmask Flags Metric Ref Use Iface<br><a href="http://216.209.3.224">216.209.3.224</a> <a href="http://216.209.3.225">
216.209.3.225</a> <a href="http://255.255.255.240">255.255.255.240</a> UG 0 0 0 eth1<br><a href="http://216.209.3.192">216.209.3.192</a> * <a href="http://255.255.255.224">255.255.255.224</a>
U 0 0 0 eth0<br><a href="http://169.254.0.0">169.254.0.0</a> * <a href="http://255.255.0.0">255.255.0.0</a> U 0 0 0 eth1<br>default <a href="http://216.209.3.193">
216.209.3.193</a> <a href="http://0.0.0.0">0.0.0.0</a> UG 0 0 0 eth0<br>[root@bser2 sysconfig]#<br><br>I think I am missing something in my routing table. <br><br>So my network are <br><br>Internet <----------> (
<a href="http://216.209.3.192/27">216.209.3.192/27</a>, GW <a href="http://216.209.3.193">216.209.3.193</a> on Eth0 and <a href="http://216.209.3.225">216.209.3.225</a> on eth1) <-----------> <Network behind the router
<a href="http://216.209.3.224/28">216.209.3.224/28</a> ><br><br><br>Inernet configuration for internal machines are<br><br>C:\Documents and Settings\Jai Rangi>ipconfig<br><br>Windows IP Configuration<br><br><br>Ethernet adapter Local Area Connection:
<br><br> Connection-specific DNS Suffix . :<br> IP Address. . . . . . . . . . . . : <a href="http://216.209.3.235">216.209.3.235</a><br> Subnet Mask . . . . . . . . . . . : <a href="http://255.255.255.240">
255.255.255.240</a><br> Default Gateway . . . . . . . . . : <a href="http://216.209.3.225">216.209.3.225</a><br><br>C:\Documents and Settings\Jai Rangi><br><br>I can ping from internet to <a href="http://216.209.3.192/27">
216.209.3.192/27</a> network. <br>I can not ping <a href="http://216.209.3.225/28">216.209.3.225/28</a> network from internet which is behind internet. <br>I can ping internal machine from router. <br>I can ping router from internal machine.
<br><br><br>I will appreciate if you can please give me some hint what I am doing wrong here. <br><br>Thank you,<br>-Jai<br><br><br><br><br><br><div><span class="gmail_quote">On 10/2/07, <b class="gmail_sendername">Peter McGill
</b> <<a href="mailto:petermcgill@goco.net">petermcgill@goco.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">First method should work, and work easier because there is
no NAT (Network Address Translation) to worry about.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">No reason the FORWARD rules wouldn't work on Public IPs, I
don't think they care at all what IP you give.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Make sure you don't use MASQUERADE, SNAT or DNAT
rules.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">-A adds the rules to the end of the chain, are there any
earlier rules that might block the public traffic?</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">iptables -t filter -n -v -L</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">iptables -t nat -n -v -L</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">iptables -t mangle -n -v -L</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Will show you all your firewall rule
details.</font></span></div>
<div><font color="#0000ff" face="Arial" size="2"></font> </div>
<div align="left"><font face="Arial" size="2">Peter McGill</font></div>
<div> </div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:users-bounces@openswan.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users-bounces@openswan.org</a>
[mailto:<a href="mailto:users-bounces@openswan.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users-bounces@openswan.org</a>] <b>On Behalf Of </b>Jai
Rangi<br><b>Sent:</b> October 2, 2007 2:56 AM<br><b>To:</b>
<a href="mailto:users@openswan.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users@openswan.org</a><br><b>Subject:</b> [Openswan Users] Firewall,Routing and
Tunneling between public networks<br></font><br></div><div><span class="e" id="q_11560e921ce94bc4_1">
<div></div>Hello List,<br>I am trying to set up a linux server as a
router/firewall and set up a SIP tunneling between two public networks. <br>My
Diagram will be something like this<br>Internet <-----> Linux Router
<--------------> My Internal Network with Public IPs. <br>Say My Network
IPs are <a href="http://216.209.14.192/26" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.192/26</a> <br>I tried
this setup.<br><br>Internet <----> <a href="http://216.209.14.197" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.197</a> (ExtIP <- Default Gateway
<a href="http://216.209.14.193" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.193</a> Router -> Internal IP)
<a href="http://216.209.14.198" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.198</a> <------> My Servers
connected through a switch with IPs 216.209.14.199-254 with Default Gateway <a href="http://216.209.14.198" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.198</a>. <br>This set up did not work.
<br><br>If I do this<br>Internet <----> <a href="http://216.209.14.197" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.197</a> (ExtIP <- Default Gateway
<a href="http://216.209.14.193" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">216.209.14.193</a> Router -> Internal IP)
<a href="http://192.168.1.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.1</a> <------> My Servers
connected through a switch with IPs 192.168.1.199-254 with Default Gateway <a href="http://192.168.1.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.1</a>.<br><br>I can go out through ip
forwarding like this... <br>iptables -P FORWARD DROP<br>iptables -A FORWARD -s
${HUB_LAN} -j ACCEPT<br>iptables -A FORWARD -d ${HUB_LAN} -j ACCEPT
<br><br>These rules does not work with public IPs. <br><br>My Other Questions
are<br>1. Can I use racoon for SIP tunneling, is there any limit on number of
sessions. Bought a juniper router and found out that the router supports on 16
channels. I need to support at least 400 SIP channels. <br>2. I have seen a
lot of documentation of setting up Masquarding and IP Forwarding. I made it
work but that does not solve my purpose. I need to assign Public IP to the my
machines behind the router so that outside world can access those machines
through router directly. <br>3. I need to have tunneling with one service
provider for network <a href="http://56.211.34.23/27" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">56.211.34.23/27</a>. For
rest of the world I want the traffic to go through the router without any
modification. I might want to add some firewall rules later for some specific
port. <br><br>I will appreciate if some one can give me some lead on how can I
achieve this. <br><br>Thank you,<br>JP<br></span></div></blockquote></div>
</blockquote></div><br>