Using --ttl-inc with iptables

I'd like to increment the TTL of routed packets going out of a tethered device so that the packets appear to originate from the router (even TTL) not the device they came from.

I've tried the following i-tables command but it is not working.

root@OpenWrt:/# iptables -t mangle -I PREROUTING -i eth2 -j TTL --ttl-inc 1
iptables v1.8.3 (legacy): unknown option "--ttl-inc"
Try `iptables -h' or 'iptables --help' for more information.

Any ideas how I can do this?

TIA

how to install sir..?
i have problem

opkg install iptables-mod-ipopt_1.4.21-3_mipsel_24kc.ipk
Installing iptables-mod-ipopt (1.4.21-3) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for iptables-mod-ipopt:
 *      kmod-ipt-ipopt *
 * opkg_install_cmd: Cannot install package iptables-mod-ipopt.

source file ipk
https://mirror-03.infra.openwrt.org/releases/17.01.1/packages/mipsel_24kc/base/

17.01 is very old. It's been EOL and unsupported for well over half a decade. It is not safe to use anymore.

What is the device in question?

ubus call system board

this sir

i need config iptabels my openwrt

iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65

result

root@192.168.188.253:~# iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65
iptables v1.4.21: unknown option "--ttl-set"
Try `iptables -h' or 'iptables --help' for more information.

We asked for the output of a command, but you posted a screenshot. Nonetheless, your device is not running official OpenWrt and doesn't appear to be supported.

How do I know?

Because the MT7621 didn't exist when LEDE 17.01 was released (nor did 802.11ax).

Edit:

Also, responding to a 4-year old post?

Lastly, I believe version 17 allows this configuration from the web GUI.

1 Like

this sir

root@192.168.188.253:~# cat /etc/os-release
NAME="LEDE"
VERSION="17.01-SNAPSHOT, Reboot"
ID="lede"
ID_LIKE="lede openwrt"
PRETTY_NAME="LEDE Reboot 17.01-SNAPSHOT"
VERSION_ID="17.01-snapshot"
HOME_URL="http://lede-project.org/"
BUG_URL="http://bugs.lede-project.org/"
SUPPORT_URL="http://forum.lede-project.org/"
BUILD_ID="unknown"
LEDE_BOARD="ramips/mt7621"
LEDE_ARCH="mipsel_24kc"
LEDE_TAINTS="no-all busybox"
LEDE_DEVICE_MANUFACTURER="LEDE"
LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="v0"
LEDE_RELEASE="LEDE Reboot 17.01-SNAPSHOT unknown"
root@192.168.188.253:~# ubus call system board
{
        "kernel": "4.4.198",
        "hostname": "192.168.188.253",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "MediaTek MT7621 RFB (802.11ax,SNOR)",
        "board_name": "mt7621-rfb-ax-nor",
        "release": {
                "distribution": "LEDE",
                "version": "17.01-SNAPSHOT",
                "revision": "unknown",
                "codename": "reboot",
                "target": "ramips\/mt7621",
                "description": "LEDE Reboot 17.01-SNAPSHOT unknown"
        }
}
root@192.168.188.253:~#

I guess you missed the rest of my post (I also noticed you hostname changed while I was drafting my reply):

You should seek support from the manufacturer or retailer of your device.

(I've noticed that your last few posts in topics have been about ancient versions of OpenWrt on unsupported devices.)

yes sir, i forget my privasi,

so don't have solusion ?

why me open this link http://forum.lede-project.org/ , refirect to official openwrt..?
wth

  • I cannot answer why your manufacturer or vendor did not change SUPPORT_URL - you'd have to ask them
  • The current URL is https://forum.openwrt.org/ - and has been for years (i.e., changed before the existence of the MT7621 and WiFi 6).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.