C
C
cold1472016-10-23 10:33:10
linux
cold147, 2016-10-23 10:33:10

Iptables How to redirect user traffic to another interface?

There are several interfaces It is 687e7eb9091148c4b285d4824c16cf40.png
necessary to redirect all the traffic of the tinyproxy user to the wlan0 interface
Here is a solution using the ip utility How to redirect the traffic of the desired user to another interface in iptables?
Is it possible to do the same with iptables only?
In general, the day of the task is to make a proxy that uses the backup Internet
PS All this is inside openwrt, the place is too small to install something else (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2016-10-23
@denis_vl

iptables is basically a firewall. But not a routing tool, although there are options.
And you need to implement source routing on a linux machine. For this, just the same, ip rules were invented.
Make additional routing tables and forward packets to them via ip rules.
And if your users get fictitious IP addresses, and NAT is used to access the Internet, then everything is even easier. Do SNAT in iptables. and "specify" each user with the address that belongs to the interface through which he should get access to the Internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question