it seems you skipped the firewall part of the document you were
referring, you need NAT connections.


On 05.06.20 18:50, Richard Ulmer wrote:
> Hi,
> I got myself an APU2E2 and am trying to set it up as a router. To learn
> how to do this I'm mostly following the "Building a Router" FAQ [1]. For
> simplicity's sake I'm only using em0 and athn0. This is my setup:
>
>                                       .-----------.
> .----------.      .------------.      |   APU2    | ))) client1
> | Internet | <--> | ISP-Router | <--> | em0 athn0 | ))) client2
> `----------'      `------------'      `-----------'
>
> I want the clients, that are connected to athn0 to be able to access the
> internet, but it doesn't work. What works is this:
>
> 1. I can connect my laptop to athn0, ping the IP of athn0 and even the
>    IP of em0. Pinging the ISP-Router doesn't work.
> 2. If I connect my laptop to the ISP-Router, I can ping em0.
> 3. When I am on the router (via ssh or COM-Port) I can ping em0, athn0
>    the ISP-Router, openbsd.org, ...
>
> So what I can't figure out is why I can't ping the ISP-Router and
> servers on the internet, when I'm connected to athn0. My APU2 setup is:
>
> $ sysctl net.inet.ip.forwarding
> net.inet.ip.forwarding=1
> $ cat /etc/mygate
> # This is the ISP-Router:
> 192.168.178.1
> $ cat /etc/hostname.em0
> inet 192.168.178.2 255.255.255.0 192.168.178.255
> up
> $ cat /etc/hostname.athn0
> media autoselect mode 11n mediaopt hostap chan 36
> nwid <mynwid> wpakey <mypw>
> inet 192.168.3.1 255.255.255.0
> $ cat /etc/pf.conf
> pass in log (all)
> $ cat /etc/rc.conf.local
> dhcpd_flags=athn0
> $ cat /etc/dhcpd.conf
> subnet 192.168.3.0 netmask 255.255.255.0 {
>         option routers 192.168.3.1;
>         option domain-name-servers 192.168.178.1;
>         range 192.168.3.20 192.168.3.100;
> }
>
> I'm an absolute noob when it comes to network configuration, so the
> problem is probably something really stupid, but I can't figure it out.
> I'll appreciate any hint!
>
> Greetings,
> Richard Ulmer
>
> [1] https://www.openbsd.org/faq/pf/example1.html
>

Reply via email to