On Ubuntu, I have two interfaces eth0
(192.168.0.X
) and wlan0
(192.168.1.X
) both in DHCP with a gateway and internet.
How can I configure the system for using eth0
for all the trafic except one public ip adress routed on wlan0
by default ?
For example :
eth0
> all the traficwlan
> just the trafic to8.8.8.8
I got some responses using iptables but not involving destination whitelist like this.
This is a simple scenario. You need to have two things:
eth0
. Next hop will be192.168.0.Y
.8.8.8.8
viawlan0
. Next hop will be192.168.1.Y
.No need to add any rule using iptables.
You can add the default route and static route using these two commands respectively: