Results 1 to 3 of 3

Thread: Iptables (20.04) won't accept my prerouting from 18.04

  1. #1
    Join Date
    Mar 2017
    Beans
    11

    Iptables (20.04) won't accept my prerouting from 18.04

    I've just installed a clean Ubuntu server 20.04, and was going to add some pre/post routing rules, but I can't get them to be added.

    I've tried

    iptables -A PREROUTING -i enp0s3 -p tcp -m tcp --dport 49620 -j DNAT --to-destination 192.168.2.53:22222

    but getting the response:

    iptables: No chain/target/match by that name.

    This worked without any issues on my older 18.04 server.
    I've searched for answer how to add a chain, but can't find anything about it..

  2. #2
    Join Date
    Apr 2014
    Location
    Tucson AZ, USA
    Beans
    1,057
    Distro
    Ubuntu

    Re: Iptables (20.04) won't accept my prerouting from 18.04

    I'm mediocre at best with iptables but it looks like you aren't passing a table to it.

    https://my.esecuredata.com/index.php...sing-iptables/

    Notice the -t flag.

  3. #3
    Join Date
    Mar 2017
    Beans
    11

    Re: Iptables (20.04) won't accept my prerouting from 18.04

    that made the error message go away, but when I'm checking with "iptables -L" it's not there.

    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •