Created
September 26, 2022 01:29
-
-
Save odevodyssey/16391b417d12df0357e3adee867c069c to your computer and use it in GitHub Desktop.
Site to Site VPN Config - Site B
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 forward 'REJECT' | |
option synflood_protect '1' | |
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_b' | |
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.2/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 'fdf9:1c5a:96a6::/48' | |
config device | |
option name 'br-lan' | |
option type 'bridge' | |
list ports 'eth0' | |
config interface 'lan' | |
option device 'wlan0' | |
option proto 'static' | |
option ipaddr '192.168.2.1' | |
option netmask '255.255.255.0' | |
option ip6assign '60' | |
config interface 'wan' | |
option proto 'dhcp' | |
option device 'eth0' | |
config interface 'site_b' | |
option proto 'wireguard' | |
option private_key 'sP01AHmCcWVpzv+KaQTtvkmBiZGFSE99Ry9FuJc5l3c=' | |
option listen_port '51820' | |
list addresses '10.10.10.2/32' | |
config wireguard_site_b | |
option description 'site_a' | |
option public_key 'zXN+QMEvcivf1QW955hxU872ugLKN1q7LLeRelRWdH4=' | |
list allowed_ips '10.10.10.0/24' | |
list allowed_ips '192.168.1.0/24' | |
option route_allowed_ips '1' | |
option endpoint_host '86.45.69.6' | |
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 '0' | |
option log_size '64' | |
option urandom_seed '0' | |
option log_proto 'udp' | |
option conloglevel '8' | |
option cronloglevel '5' | |
option hostname 'Site_B' | |
option zonename 'America/New York' | |
option timezone 'EST5EDT,M3.2.0,M11.1.0' | |
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 B' | |
option key 'YourWiFiPassword' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment