Created
September 26, 2022 01:41
-
-
Save odevodyssey/7835d43af8aa21a667eabee858caba1a to your computer and use it in GitHub Desktop.
Site to Site VPN Config - Site A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/config/firewall | |
config defaults | |
option input 'ACCEPT' | |
option output 'ACCEPT' | |
option synflood_protect '1' | |
option forward 'REJECT' | |
config zone | |
option name 'lan' | |
option input 'ACCEPT' | |
option output 'ACCEPT' | |
option forward 'ACCEPT' | |
list network 'lan' | |
config zone | |
option name 'wan' | |
option input 'REJECT' | |
option output 'ACCEPT' | |
option forward 'REJECT' | |
option masq '1' | |
option mtu_fix '1' | |
list network 'wan' | |
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-IGMP' | |
option src 'wan' | |
option proto 'igmp' | |
option family 'ipv4' | |
option target 'ACCEPT' | |
config rule | |
option name 'Allow-DHCPv6' | |
option src 'wan' | |
option proto 'udp' | |
option src_ip 'fc00::/6' | |
option dest_ip 'fc00::/6' | |
option dest_port '546' | |
option family 'ipv6' | |
option target 'ACCEPT' | |
config rule | |
option name 'Allow-MLD' | |
option src 'wan' | |
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 '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 rule | |
option name 'Allow-IPSec-ESP' | |
option src 'wan' | |
option dest 'lan' | |
option proto 'esp' | |
option target 'ACCEPT' | |
config rule | |
option name 'Allow-ISAKMP' | |
option src 'wan' | |
option dest 'lan' | |
option dest_port '500' | |
option proto 'udp' | |
option target 'ACCEPT' | |
config rule | |
option name 'Support-UDP-Traceroute' | |
option src 'wan' | |
option dest_port '33434:33689' | |
option proto 'udp' | |
option family 'ipv4' | |
option target 'REJECT' | |
option enabled 'false' | |
config include | |
option path '/etc/firewall.user' | |
config zone | |
option name 'vpn' | |
option input 'ACCEPT' | |
option output 'ACCEPT' | |
option forward 'REJECT' | |
list network 'site_a' | |
config forwarding | |
option src 'lan' | |
option dest 'vpn' | |
config forwarding | |
option src 'vpn' | |
option dest 'wan' | |
config redirect | |
option dest 'vpn' | |
option target 'DNAT' | |
option name 'wg' | |
list proto 'udp' | |
option src 'wan' | |
option src_dport '51820' | |
option dest_ip '10.10.10.1/32' | |
option dest_port '51820' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/config/network | |
config interface 'loopback' | |
option device 'lo' | |
option proto 'static' | |
option ipaddr '127.0.0.1' | |
option netmask '255.0.0.0' | |
config globals 'globals' | |
option ula_prefix 'fdce:c9e5:9451::/48' | |
config device | |
option name 'br-lan' | |
option type 'bridge' | |
list ports 'usb0' | |
config interface 'lan' | |
option proto 'static' | |
option ipaddr '192.168.1.1' | |
option netmask '255.255.255.0' | |
option ip6assign '60' | |
option device 'wlan0' | |
config interface 'wan' | |
option proto 'dhcp' | |
option device 'eth0' | |
config interface 'site_a' | |
option proto 'wireguard' | |
option private_key 'wGEW2/xihsdc63Z6uT4vpm5sG1Q24wY7boBUKxhdQWQ=' | |
option listen_port '51820' | |
list addresses '10.10.10.1/32' | |
config wireguard_site_a | |
option description 'site_b' | |
option public_key 'bBNUL3+/CPodyfWNxfEnER762KkDIQYDsFOjO7G9Qnk=' | |
list allowed_ips '10.10.10.0/24' | |
list allowed_ips '192.168.2.0/24' | |
option route_allowed_ips '1' | |
option endpoint_host '205.79.33.106' | |
option endpoint_port '51820' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/config/system | |
config system | |
option ttylogin '1' | |
option log_size '64' | |
option urandom_seed '0' | |
option log_proto 'udp' | |
option conloglevel '8' | |
option cronloglevel '5' | |
option zonename 'America/New York' | |
option timezone 'EST5EDT,M3.2.0,M11.1.0' | |
option hostname 'Site_A' | |
config timeserver 'ntp' | |
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/config/wireless | |
config wifi-device 'radio0' | |
option type 'mac80211' | |
option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1' | |
option channel '36' | |
option band '5g' | |
option htmode 'VHT80' | |
option cell_density '0' | |
config wifi-iface 'default_radio0' | |
option device 'radio0' | |
option network 'lan' | |
option mode 'ap' | |
option encryption 'psk2' | |
option ssid 'Site A' | |
option key 'YourWiFiPassword' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment