|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Rebooting router necessary?
I use OpenBSD as an experimental home router and there is a wifi external device attached to it as an access point. It works well so far. The only problem I have is when I switch off and on the wifi it has no access to internet then and I need to reboot the router. Wifi connects to router just fine but doesn't get connected to outer internet so I guess it's Packet Filter. Is there any way around it?
|
|
||||
Not sure if this helps, but you can restart your network without rebooting by running the netstart(8) script. It's what the system does when it boots.
See the manpage for further explanation. You can also perform a dry-run of netstart with the -n option. This will simply print all the commands netstart would run if invoked normally. |
|
|||
As a start you could run these commands when you rebooted your OBSD pf router and WiFi clients can access the internet:
Code:
# (ifconfig -A ; netstat -rn -f inet ; cat /etc/resolv.conf) >working_log.txt Code:
# (ifconfig -A ; netstat -rn -f inet ; cat /etc/resolv.conf) >notworking_log.txt Code:
# diff -u working_log.txt notworking_log.txt
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Thank you, fvgit. I tried the netstart script before and it did not help. Didn't know about the -n option, though.
|
|
|||
J65nko,
the relevant part (plus = notworking_log): Code:
-192.168.2/24 192.168.2.1 UCn 3 18 - 4 ure1 -192.168.2.1 d0:37:45:ec:fc:9d UHLl 0 73 - 1 ure1 -192.168.2.16 94:be:46:b6:24:a7 UHLc 1 1684 - 3 ure1 -192.168.2.19 e4:c3:2a:65:c3:30 UHLc 0 3 - 3 ure1 -192.168.2.20 e4:c3:2a:65:c3:30 UHLc 1 81 - 3 ure1 +192.168.2/24 192.168.2.1 UCn 0 0 - 4 ure1 +192.168.2.1 d0:37:45:ec:fc:9d UHLl 0 0 - 1 ure1 192.168.2.255 192.168.2.1 UHb 0 0 - 1 ure1 |
|
|||
I have a similar setup. An Alix 386 OpenBSD system with three NICs, one external, one for the internal wired Ethernet home LAN, and one for the WiFi router/access point.
On the Alix dhcpd has been configured to handle requests from both the internal wired LAN as well as from the WiFi clients. The following snippet is for the WiFi clients on the 10.7.7.0/24 NIC Code:
40 subnet 10.7.7.0 netmask 255.255.255.0 { 41 42 option routers 10.7.7.10; 43 range 10.7.7.11 10.7.7.254; 44 45 } Who gives out the addresses for your WiFi clients?Your WiFi router or your OpenBSD pf router?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
In fact, there is subnet for LAN as well. The wifi part is:
Code:
subnet 192.168.2.0 netmask 255.255.255.0 { option domain-name-servers 192.168.2.1; option routers 192.168.2.1; range 192.168.2.10 192.168.2.254; } |
|
|||
How is the WiFi access point connected to the OpenBSD pf router? How many NIC's does your OpenBSD pf box have? Three?
All three NICs should be on a different subnet. What is the output of # ifconfig -A ?This is mine: Code:
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0d:b9:2a:bf:e0 priority: 0 groups: egress media: Ethernet autoselect (100baseTX full-duplex) status: active inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 vr1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0d:b9:2a:bf:e1 priority: 0 groups: internal media: Ethernet autoselect (100baseTX full-duplex) status: active inet 192.168.222.10 netmask 0xffffff00 broadcast 192.168.222.255 vr2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0d:b9:2a:bf:e2 priority: 0 groups: internal media: Ethernet autoselect (100baseTX full-duplex) status: active inet 10.7.7.10 netmask 0xffffff00 broadcast 10.7.7.255 inet 10.7.7.11 netmask 0xffffffff
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Wifi is connected to external NIC (ure1, 192.168.2). LAN is connected to external NIC (ure0, 192.168.1). All via cable.
Code:
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 90:1b:0e:56:ba:6c index 1 priority 0 llprio 3 groups: egress media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause) status: active inet 192.168.8.110 netmask 0xffffff00 broadcast 192.168.8.255 ... ure0: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> mtu 1500 lladdr 7c:c2:c6:1c:6b:86 index 4 priority 0 llprio 3 media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause) status: active inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 ure1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr d0:37:45:ec:fc:9d index 5 priority 0 llprio 3 media: Ethernet autoselect (none) status: no carrier inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255 There are 2 subnets (1 and 2 see the IPs above) defined in "dhcpd.conf" (subnet 2 definition above, subnet 1 is basically the same, only printer is given fixed IP). "pf.conf" has the same setup for both subnets which is why I find this behavior strange. Last edited by erpete; 3rd November 2021 at 05:54 PM. |
|
|||
The ure1 ethernet adapter is an USB device. I wonder whether that could be the cause.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Yes, it is -- out of necessity. I'll try to swap ure1 and re0 and see if that helps. Thanks for the idea.
|
|
|||
Connecting wifi router to internal NIC didn't help either.
Finally, upgrade to 7.0 seems to fix it. Last edited by erpete; 7th November 2021 at 08:37 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
home router + firewall behind ISP router | beiroot | OpenBSD General | 24 | 3rd April 2017 08:40 PM |
NAT router | psypro | OpenBSD General | 18 | 27th October 2016 08:29 PM |
DSL Router | Zvrk | NetBSD General | 1 | 18th June 2009 01:21 PM |
Good router | terryd | General software and network | 10 | 9th February 2009 09:31 PM |
D-link (DI-524) router | c0mrade | General software and network | 3 | 26th January 2009 08:14 AM |