Skip to content

Commit

Permalink
openwrt: add default config
Browse files Browse the repository at this point in the history
  • Loading branch information
blocktrron committed Jul 26, 2024
1 parent b6e4d31 commit bacba54
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openwrt/oob-packages/ffda-oob-firmware/files/config/dropbear
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config dropbear
option PasswordAuth 'on'
option RootPasswordAuth 'on'
option Port '22'
# option BannerFile '/etc/banner'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config core 'core'
option enabled '1'
option host '10.66.225.69'
option log_level '3'
option interval '300'
option reporter_id '3'
76 changes: 76 additions & 0 deletions openwrt/oob-packages/ffda-oob-firmware/files/config/firewall
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'

config rule
option name 'Allow-SSH'
option src '*'
option proto 'tcp'
option dest_port '22'
option target 'ACCEPT'

config rule
option name 'Allow-DHCP-Renew'
option src '*'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'

config rule
option name 'Allow-Ping'
option src '*'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'

config rule
option name 'Allow-MLD'
option src '*'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Input'
option src '*'
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 zone 'wired_zone'
option name 'wired'
list network 'wan'
list network 'lan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'

config zone 'wwan_zone'
option name 'wwan'
list network 'wwan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

39 changes: 39 additions & 0 deletions openwrt/oob-packages/ffda-oob-firmware/files/config/network
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

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

config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '4 0t'

config interface 'wwan'
option proto 'qmi'
option device '/dev/cdc-wdm0'
option apn 'internet'
option auth 'none'
option pdptype 'ipv4'
option mcc '262'
option mnc '1'

config interface 'wan'
option device 'eth1'
option proto 'none'

config interface 'lan'
option device 'eth0.1'
option proto 'none'

36 changes: 36 additions & 0 deletions openwrt/oob-packages/ffda-oob-firmware/files/config/system
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

config system
option hostname 'OpenWrt'
option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
option ttylogin '0'
option log_size '64'
option urandom_seed '0'

config timeserver 'ntp'
option enabled '0'
option enable_server '0'
list server '0.openwrt.pool.ntp.org'
list server '1.openwrt.pool.ntp.org'
list server '2.openwrt.pool.ntp.org'
list server '3.openwrt.pool.ntp.org'

config led 'led_wan'
option name 'WAN'
option sysfs 'green:wan'
option trigger 'netdev'
option mode 'link tx rx'
option dev 'eth1'

config led 'led_lan'
option name 'LAN'
option sysfs 'green:lan'
option trigger 'switch0'
option port_mask '0x10'

config led 'led_3gnet'
option name 'LTE'
option sysfs 'green:lte'
option trigger 'netdev'
option mode 'link tx rx'
option dev 'wwan0'

16 changes: 16 additions & 0 deletions openwrt/oob-packages/ffda-oob-firmware/files/config/wireless
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/ahb/18100000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option disabled '1'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'

0 comments on commit bacba54

Please sign in to comment.