WAN にフレッツ網の ONU を接続し、認証情報を用いてインターネットサービスプロバイダー (ISP) と PPPoE 接続します。この接続を IP マスカレードで LAN 側のコンピュータがインターネットに接続できるようにします。
{
"network": {
"wan4": {
"@type": "interface",
"proto": "pppoe",
"device": "sfp0",
"username": "[email protected]",
"password": "*******",
"ipv6": "0",
"mtu": 1454
},
"lan0": {
"@type": "interface",
"proto": "static",
"netmask": "255.255.255.0",
"ipaddr": "192.168.100.1",
"device": "br0"
},
"@": [
{
"@type": "device",
"type": "bridge",
"name": "br0",
"ports": [
"eth0",
"eth1",
"eth2",
"eth3",
"sfp1",
"sfp2",
"sfp3"
],
"bridge_empty": "1"
}
]
},
"dhcp": {
"@": [
{
"@type": "dnsmasq",
"domainneeded": "1",
"localise_queries": "1",
"rebind_protection": "1",
"rebind_localhost": "1",
"expandhosts": "1",
"cachesize": "1000",
"authoritative": "1",
"readethers": "1"
}
],
"lan0": {
"@type": "dhcp",
"interface": "lan0",
"start": "100",
"limit": "150",
"leasetime": "12h",
"ra": "relay",
"dhcpv6": "relay",
"ndp": "relay"
}
},
"firewall": {
"@": [
{
"@type": "defaults",
"syn_flood": "1",
"input": "REJECT",
"output": "ACCEPT",
"forward": "REJECT"
},
{
"@type": "zone",
"name": "lan",
"network": [
"lan0"
],
"input": "ACCEPT",
"output": "ACCEPT",
"forward": "ACCEPT"
},
{
"@type": "zone",
"name": "wan",
"network": [
"wan4"
],
"input": "REJECT",
"output": "ACCEPT",
"forward": "REJECT",
"masq": "1",
"mtu_fix": "1"
},
{
"@type": "forwarding",
"src": "lan",
"dest": "wan"
},
{
"@type": "rule",
"name": "Allow-DHCP-Renew",
"src": "wan",
"proto": "udp",
"dest_port": "68",
"target": "ACCEPT",
"family": "ipv4"
},
{
"@type": "rule",
"name": "Allow-Ping",
"src": "wan",
"proto": "icmp",
"icmp_type": "echo-request",
"family": "ipv4",
"target": "ACCEPT"
},
{
"@type": "rule",
"name": "Allow-IGMP",
"src": "wan",
"proto": "igmp",
"family": "ipv4",
"target": "ACCEPT"
},
{
"@type": "rule",
"name": "Allow-IPSec-ESP",
"src": "wan",
"dest": "lan",
"proto": "esp",
"target": "ACCEPT"
},
{
"@type": "rule",
"name": "Allow-ISAKMP",
"src": "wan",
"dest": "lan",
"dest_port": "500",
"proto": "udp",
"target": "ACCEPT"
}
]
},
"system": {
"@": [
{
"@type": "system",
"hostname": "my-awesome-router",
"timezone": "JST-9",
"zonename": "Asia/Tokyo"
}
]
}
}