Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #1260

Re: linux as multi-port (subnet) router using Ubuntu 11.10 server

From lincy <lincylin@gmail.com>
Newsgroups comp.os.linux.networking
Subject Re: linux as multi-port (subnet) router using Ubuntu 11.10 server
Date 2012-04-09 12:56 -0700
Organization http://groups.google.com
Message-ID <16433470.0.1334001361795.JavaMail.geo-discussion-forums@pbcio9> (permalink)
References (8 earlier) <jlsjd0$2u7i$1@saria.nerim.net> <13689836.1943.1333930427032.JavaMail.geo-discussion-forums@pbvs10> <jlu7ip$g2l$1@saria.nerim.net> <23753461.82.1333978858232.JavaMail.geo-discussion-forums@pbvy6> <jlvbm4$u16$1@saria.nerim.net>

Show all headers | View raw


Pascal Hambourg於 2012年4月10日星期二UTC+8上午3時01分22秒寫道:
> lincy a écrit :
> > Sorry, I was wrong. I was issue some iptable rule.
> 
> It cannot possibly be an issue with some iptables rule, as iptables-save
> showed no rule at all.
> 

I meaning I am try&error to type iptable rule from command line to test it. I don't save the rule or edit the script file.

I am reboot machine and capture fresh package with no any rule.


> > dump for eth2:
> > 21:00:36.457244 ARP, Request who-has 192.168.3.51 tell 192.168.51.1, length 28
> 
> Huh ? "tell 192.168.51.1" ? What is the address configured on eth2 ?
> 

It's typing error. sorry. should be 192.168.3.1

> > 21:00:36.457510 ARP, Reply 192.168.3.51 is-at 70:5a:b6:40:02:d5, length 46
> > 21:00:36.593887 IP 192.168.2.181 > 192.168.3.51: ICMP echo request, id 3, seq 56228, length 40
> [...]
> So the echo request is forwarded, but no reply ever comes back.
> I can see only two explanations :
> - host 192.168.3.51 default route is misconfigured or missing
> - or it has a firewall which drops requests from other subnets.
> 

The default route of 192.168.3.51 was 192.168.3.1
I am guess the kernel drop something too. But I don't know why. Because the iptable rule are empty.

> > Ok, here is what I try...
> > 
> > iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -d 192.168.3.0/24 -j SNAT --to 192.168.3.1
> > iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -d 192.168.2.0/24 -j SNAT --to 192.168.2.1
> 
> Ah, SNAT aka masquerading. It is called "masquerading" because it
> masquerades the source address, but I like to say that it is actually
> used to masquerade the real - routing of filtering - problem.
> 

yes, I just try to see masq work or not. But the service won't work. Just can ping. Weird....

This 4ports linux box was hard to setup more then internet firewall box. >_<

Firewall rule to reject all then accept what you want was easy understand.

This machine no any rule, all chain was accept. I can't understand where to drop/reject/block package. so this box don't work as I expected.

> > now can ping from 192.168.2.x to 192.168.3.x,  vice versa.

Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 05:50 -0700
  Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-04-08 17:16 +0300
    Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 08:26 -0700
      Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 08:47 -0700
        Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-08 18:13 +0200
          Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 09:24 -0700
            Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-08 18:31 +0200
              Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 09:44 -0700
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-08 19:54 +0200
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 17:13 -0700
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-09 10:45 +0200
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-09 06:40 -0700
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-09 21:01 +0200
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-09 12:56 -0700
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-09 23:33 +0200
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-04-10 08:55 +0300
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-09 23:40 -0700
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-04-10 14:39 +0300
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-10 08:22 -0700
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-04-08 21:13 +0300
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-04-08 20:48 +0200
                Re: linux as multi-port (subnet) router using Ubuntu 11.10 server lincy <lincylin@gmail.com> - 2012-04-08 17:25 -0700

csiph-web