failed to start v2ray-core: not support "redirect" mode of transparent proxy: ExecCommands: iptables -w 2 -t nat -N TP_OUT Bad argument `2' Try `iptables -h' or 'iptables --help' for more information. : exit status 2
Check the iptables configuration: Make sure that the iptables configuration is correct and that the TP_OUT chain is defined. You can check the iptables configuration by running the command iptables -L. If the TP_OUT chain is not defined, you can define it by running the command iptables -N TP_OUT -t nat.failed to start v2ray-core: not support "redirect" mode of transparent proxy: ExecCommands: iptables -w 2 -t nat -N TP_OUT Bad argument `2' Try `iptables -h' or 'iptables --help' for more information. : exit status 2
did not workedCheck the iptables configuration: Make sure that the iptables configuration is correct and that the TP_OUT chain is defined. You can check the iptables configuration by running the command iptables -L. If the TP_OUT chain is not defined, you can define it by running the command iptables -N TP_OUT -t nat.
It seems that the iptables command in the ExecCommands section of your v2ray-core configuration file is not correctly formatted.
The error message indicates that the argument 2 is not valid for the iptables command. The 2 in this context refers to the timeout value, which is not a valid argument for the redirect mode of transparent proxy.
To fix this issue, you can try removing the 2 from the ExecCommands section of your configuration file, like this:CopyCopy
ExecCommands:
iptables -w -t nat -N TP_OUT
CopyCopy
This will disable the timeout feature and allow the iptables command to execute without any issues.Copy
Alternatively, you can modify the ExecCommands section to use the -j option instead of -t to specify the target chain, like this
ExecCommands:
iptables -w -j TP_OUT -N
CopyCopy
This will create a new chain called TP_OUT and set its policy to ACCEPT, which should allow the traffic to be redirected correctly.
Note that the redirect mode of transparent proxy is not the only way to configure iptables for transparent proxying. You may also consider using the DSCP mode, which uses the DSCP mark to identify and redirect traffic.
Here's an example of how you can modify your v2ray-core configuration file to use DSCP mode
ustralias:
iptables:
-w
-t
-N
-p
-j
-M
-n
-X
-g
In this example, the iptables command is run with the -w option to enable wrapping, the -t option to specify the target chain (TP_OUT), the -N option to create a new chain if it doesn't exist, the -p option to specify the protocol ( sorte.ssh), the -j option to specify the target jump ( DSCP ), the -M option to set the mark ( 0x13 ), the -n option to specify the interface name ( any ), and the `-X
system tun
and gvisor tun
option. I enabled this option but I can not how can I use this?tun1
with 2022 table ID. But I could not pass any traffic through it.ip rule add from 10.8.0.0/24 lookup 2022
tun1
will not had any response.ping 1.1.1.1 -I tun1
curl ifconfig.io --interface tun1
traceroute 1.1.1.1 -i tun1