[Solved] Ppp-wan bridge lan

Hello, I have been reading a lot of documentation and looking at examples but I still don't grasp how I should configure the following. I have a ppp connection to a 4G LTE modem on /dev/ttyACM0. My configuration sets this up as the wan (gets renamed from ppp0 to ppp-wan during bootup).

[ 43.920474] ppp-wan: renamed from ppp0

I thought I wanted to bridge this ppp-wan interface to lan so I can have an access point on radio0 (wlan0). I am not sure that is correct though because of the static address from the modem of 10.0.1.66. I am stuck not understanding if I need NAT between ppp-wan and lan, or can I bridge? I will have to run my own dhcp so that seems to tell me I cannot bridge.

My device has physical ports eth0 and eth1 but I am not using those. I am connecting to the modem over USB which is /dev/ttyACM0. When I boot I can ping the internet so I know my modem is up. I can connect a device (with wireless IP set static to 10.0.1.200) to my AP, but cannot ping internet.

root@LEDE:/etc/config# cat dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv6 'server'
        option ra 'server'
        option ignore '1'
        option ra_management '1'

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'
        option loglevel '4'

root@LEDE:/etc/config# cat network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd73:2540:a87a::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'ppp0'
        option proto 'static'
        option ipaddr '10.0.1.1'
        option netmask '255.255.255.0'
        option gateway '10.0.1.55'
        option dns '10.0.1.55'

config interface 'wan'
        option ifname 'ppp0'
        option proto 'ppp'
        option device '/dev/ttyACM0'
        option speed '115200'
        option file '/etc/ppp/vzw-GELS3-pppd-options'
        option connect '/usr/sbin/chat -v -f /etc/ppp/peers/vzw-GELS3-chat'
        option ipv6 'auto'

root@LEDE:/etc/config# cat wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/soc/a000000.wifi'
        option htmode 'HT20'
        option txpower '14'
        option country 'US'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Jalapeno_Node1'
        option encryption 'psk2'
        option key 'abcd1234'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/a800000.wifi'
        option htmode 'VHT80'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'LEDE'
        option encryption 'none'
        option network 'lan'

   root@LEDE:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr C4:93:00:0F:30:6F
          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::c693:ff:fe0f:306f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1008 (1008.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:1573 (1.5 KiB)  TX bytes:1573 (1.5 KiB)

ppp-wan   Link encap:Point-to-Point Protocol
          inet addr:10.0.1.66  P-t-P:10.0.1.55  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:35 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:2943 (2.8 KiB)  TX bytes:2664 (2.6 KiB)

wlan0     Link encap:Ethernet  HWaddr C4:93:00:0F:30:6F
          inet6 addr: fe80::c693:ff:fe0f:306f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:2016 (1.9 KiB)

Sorry for such basic questions, but after a lot of reading I don't really understand the difference between 10.0.1.66 adrs and 10.0.1.55 PtP link. Is 10.0.1.66 my router address and 10.0.1.55 the modem address?

Simple overview of the setup:
skywire 4G LTE modem <--wan--> jalapeno router <--lan--> laptop



More in depth view of the setup:
skywire modem <---> jalapeno router ppp-wan zone <--firewall--> jalapeno router br-lan zone <-|--> eth0 to laptop1 192.168.5.200
                    10.0.1.66 address                           192.168.5.25 address          |--> eth1 to laptop2 192.168.5.201
                    10.0.1.55 PtP address                                                     |--> wlan0 to laptop3 192.168.5.202
																						      |--> wlan1 to laptop4 192.168.5.203
																						  (bridged lan)
																						 
root@LEDE:/etc/config# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.1.55       0.0.0.0         UG    0      0        0 ppp-wan
10.0.1.55       *               255.255.255.255 UH    0      0        0 ppp-wan
192.168.5.0     *               255.255.255.0   U     0      0        0 br-lan
																					 
																					 
																					 

ppp-wan   Link encap:Point-to-Point Protocol
          inet addr:10.0.1.66  P-t-P:10.0.1.55  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:57 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:5250 (5.1 KiB)  TX bytes:3986 (3.8 KiB)

Standby, I found this so give me time to read it.

Linux Network Administrator's Guide, 2nd Edition
http://www.oreilly.com/openbook/linag2/book/

OK, I figured this out and got internet access working. I used ip command to add an entry to the route table that I noticed was missing when I compared to a standard router configuration that does not use ppp.

ip route add 10.0.1.0/24 dev ppp-wan scope link src 10.0.1.66

root@OpenWrt:/etc/iproute2# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.1.55       0.0.0.0         UG    0      0        0 ppp-wan
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 ppp-wan
10.0.1.55       0.0.0.0         255.255.255.255 UH    0      0        0 ppp-wan
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
root@OpenWrt:/etc/iproute2# ip route list
default via 10.0.1.55 dev ppp-wan
10.0.1.0/24 dev ppp-wan scope link  src 10.0.1.66
10.0.1.55 dev ppp-wan scope link  src 10.0.1.66
192.168.3.0/24 dev br-lan scope link  src 192.168.3.1

Then do:
ip route flush cache

NOTE: route table add does not persist through reboot, if put in rc_local it happens too early before iface is up
FIXED: Had to add a file in /etc/hotplug.d/iface

vi 50-addroute
[ ifup = "$ACTION" -a "$DEVICE" = ppp-wan ] && {
        ip route add 10.0.1.0/24 dev ppp-wan scope link src 10.0.1.66
}

now the route is added during bootup once the ppp-wan interface comes up.