hello everyone, I would like to avoid the double nat but I can't figure it out.
My network is composed like this, ont --> router openwrt pppoe --> firewall --> switch.
I find myself in the situation that both openwrt and the firewall do nat while I would like only the firewall to take care of the nat and openwrt to only do the pppoe connection, how can I do it?
I attach my openwrt config
br-lan Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.170.1 Bcast:192.168.170.255 Mask:255.255.255.0
inet6 addr: fd35:xxxx:xxxx::1/64 Scope:Global
inet6 addr: fe80::xxxx:xxxx:fexx:f062/64 Scope:Link
inet6 addr: 2a07:xxxx:xxxx::1/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15268 errors:0 dropped:0 overruns:0 frame:0
TX packets:9749 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1564205 (1.4 MiB) TX bytes:9533261 (9.0 MiB)
eth0 Link encap:Ethernet HWaddr 88:01:xx:xx:xx:xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:80a00000-80afffff
eth1 Link encap:Ethernet HWaddr 88:01:xx:xx:xx:xx
inet6 addr: fe80::8a01:xxxx:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2048753 errors:0 dropped:0 overruns:0 frame:0
TX packets:404234 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2929093156 (2.7 GiB) TX bytes:347830639 (331.7 MiB)
Memory:80800000-808fffff
eth1.835 Link encap:Ethernet HWaddr 88:01:xx:xx:xx:xx
inet6 addr: fe80::8a01:xxxx:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7006 errors:0 dropped:0 overruns:0 frame:0
TX packets:404227 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4345231 (4.1 MiB) TX bytes:347829813 (331.7 MiB)
eth2 Link encap:Ethernet HWaddr 88:01:xx:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:407556 errors:0 dropped:0 overruns:0 frame:0
TX packets:2053613 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:345321400 (329.3 MiB) TX bytes:2917987928 (2.7 GiB)
Memory:80600000-806fffff
eth3 Link encap:Ethernet HWaddr 88:01:xx:xx:xx:xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:80400000-804fffff
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:109 errors:0 dropped:0 overruns:0 frame:0
TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9723 (9.4 KiB) TX bytes:9723 (9.4 KiB)
pppoe-wan Link encap:Point-to-Point Protocol
inet addr:195.xx.xxx.xxx P-t-P:100.xx.xxx.xxx Mask:255.255.255.255
inet6 addr: 2a07:xxxx:xxxx:1::1/64 Scope:Global
inet6 addr: fd35:xxxx:xxxx:1::1/64 Scope:Global
inet6 addr: fe80::a067:xxxxx:xxxx:f9ef/128 Scope:Link
inet6 addr: 2a07:7e87:2000:xxxxx:xxxxx:xxxx:xxxx:xxxx/64 Scope:Global
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:6735 errors:0 dropped:0 overruns:0 frame:0
TX packets:403952 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:4277559 (4.0 MiB) TX bytes:338934024 (323.2 MiB)
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 'fd35:3622:a023::/48'
option packet_steering '2'
option steering_flows '128'
config device
option name 'br-lan'
option type 'bridge'
option ipv6 '1'
list ports 'eth0'
list ports 'eth2'
list ports 'eth3'
option igmp_snooping '1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.170.1'
option netmask '255.255.255.0'
option ip6assign '64'
config interface 'wan'
option proto 'pppoe'
option pppoe_vlan '835'
option username 'campanelliangel20of'
option password '85gzhtqb'
option ipv6 'auto'
option force_link '1'
option device 'eth1.835'
option ip6assign '64'
config device
option type '8021q'
option ifname 'eth1'
option vid '835'
option name 'eth1.835'
option ipv6 '1'
root@OpenWrt:~# cat /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 'fd35:xxxx:xxxx::/48'
option packet_steering '2'
option steering_flows '128'
config device
option name 'br-lan'
option type 'bridge'
option ipv6 '1'
list ports 'eth0'
list ports 'eth2'
list ports 'eth3'
option igmp_snooping '1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.170.1'
option netmask '255.255.255.0'
option ip6assign '64'
config interface 'wan'
option proto 'pppoe'
option pppoe_vlan '835'
option username 'xxxxxxx'
option password 'xxxxx'
option ipv6 'auto'
option force_link '1'
option device 'eth1.835'
option ip6assign '64'
config device
option type '8021q'
option ifname 'eth1'
option vid '835'
option name 'eth1.835'
option ipv6 '1'
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
option flow_offloading '1'
option flow_offloading_hw '1'
config zone
option name 'wan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '1'
option mtu_fix '1'
list network 'wan'
config zone
option name 'lan2'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
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 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 forwarding
option src 'lan2'
option dest 'wan'
config redirect
option dest 'lan2'
option target 'DNAT'
option name 'firewalla dmz'
option src 'wan'
option dest_ip '192.168.170.90'
list proto 'all'
config forwarding
option dest 'lan2'
config forwarding
option dest 'lan2'
config forwarding
option dest 'lan2'
config forwarding
option dest 'lan2'
config forwarding
option dest 'lan2'
config forwarding
option dest 'wan'
config forwarding
option dest 'wan'
any help is appreciated