Hello all, first-time poster, long-time lurker here. I'm looking for some assistance with the configuration of a physically remote OpenWRT setup detailed below. I've cross-posted from https://forum.openwrt.org/viewtopic.php?id=55797 as there may be a wider issue with 4G / double NAT etc...
Device: Raspberry Pi
Release: Barrier Breaker
Version: r44365
External access: 4G dongle attached to wwan0
Internal access: wireless access point attached to eth0
Topography: 4G dongle has its own network giving 192.168.1.100 to wwan0, external access through 192.168.1.1. I've configured the dongle to put 192.168.1.100 in its DMZ (this is an attempt to avoid double NAT issues). The internal network is on 192.168.3.x.
Aim: To be able to access the computers attached to the local network using Apple's Back to my Mac service.
Issue: After initial set-up (miniupnpd NOT installed) I was able to access the machines via Back to my Mac (ssh / screen sharing etc) but with a warning about upnp / natpmp not working on the router - and the performance wasn't great. I then installed miniupnpd hoping this would allow the internal machines to open ports and thus the services to run properly. I now have no access to the machines via Back to my Mac.
Luckily, I set up a reverse ssh tunnel using autossh prior to doing all this, so I can get in to the Pi from my location!
I'd really appreciate if someone could look at my config files and see if something is incorrectly set. Below are my network, dhcp, firewall and upnp files. As I wrote above, I had services working (but with warnings) before miniupnpd was installed, which makes me think the issue may lie in the firewall / upnp configs...
Many thanks!
Device: Raspberry Pi
Release: Barrier Breaker
Version: r44365
External access: 4G dongle attached to wwan0
Internal access: wireless access point attached to eth0
Topography: 4G dongle has its own network giving 192.168.1.100 to wwan0, external access through 192.168.1.1. I've configured the dongle to put 192.168.1.100 in its DMZ (this is an attempt to avoid double NAT issues). The internal network is on 192.168.3.x.
Aim: To be able to access the computers attached to the local network using Apple's Back to my Mac service.
Issue: After initial set-up (miniupnpd NOT installed) I was able to access the machines via Back to my Mac (ssh / screen sharing etc) but with a warning about upnp / natpmp not working on the router - and the performance wasn't great. I then installed miniupnpd hoping this would allow the internal machines to open ports and thus the services to run properly. I now have no access to the machines via Back to my Mac.
Luckily, I set up a reverse ssh tunnel using autossh prior to doing all this, so I can get in to the Pi from my location!
I'd really appreciate if someone could look at my config files and see if something is incorrectly set. Below are my network, dhcp, firewall and upnp files. As I wrote above, I had services working (but with warnings) before miniupnpd was installed, which makes me think the issue may lie in the firewall / upnp configs...
Many thanks!
Code:
# cat network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wwan'
option ifname 'wwan0'
option proto 'dhcp'
config globals 'globals'
option ula_prefix 'fdc6:56ef:a600::/48'
Code:
# cat dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0' #added to enable SRV records -> https://jamezpolley.com/2009/09/openwrt-dnsmasq-miniupnpd-and-back-to-my-mac/
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'local'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
# option server 8.8.8.8
# option server 8.8.4.4
config dhcp 'lan'
option interface 'lan'
option start '3'
option limit '250'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
# list dhcp_option '6,192.168.1.1'
list dhcp_option '6,8.8.8.8'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
Code:
# cat firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option network 'lan'
config zone
option name 'wan'
option output 'ACCEPT'
option mtu_fix '1'
option input 'REJECT'
option forward 'REJECT'
option masq '1'
option network 'wan wan6 wwan'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fe80::/10'
option src_port '547'
option dest_ip 'fe80::/10'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config include
option path '/etc/firewall.user'
config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'any'
option reload '1'
Code:
# cat upnpd
config upnpd 'config'
option enable_natpmp '1'
option enable_upnp '1'
option download '1024'
option upload '512'
option internal_iface 'lan'
option port '5000'
option upnp_lease_file '/var/upnp.leases'
option uuid 'XXXXXXXXXXXXXXXXXX'
option log_output '0'
config perm_rule
option action 'allow'
option ext_ports '1024-65535'
option int_addr '0.0.0.0/0'
option int_ports '1024-65535'
option comment 'Allow high ports'
config perm_rule
option action 'deny'
option ext_ports '0-65535'
option int_addr '0.0.0.0/0'
option int_ports '0-65535'
option comment 'Default deny'