.79
10.176.229.0/26 dev modem1 scope link
127.0.0.0/8 dev lo scope link
192.168.0.0/24 dev eth0 scope link

So, locally on PC-1, I have internet access.
I have also PC-2 within the LAN, and would like to setup masquerade on PC-1 to provide internet for PC-2.
I'm trying the following nftables config:
# nft list ruleset
table ip filter {
        chain input {
                type filter hook input priority 0; policy accept;
        }

        chain forward {
                type filter hook forward priority 0; policy accept;
        }

        chain output {
                type filter hook output priority 0; policy accept;
        }
}
table ip nat {
        chain input {
                type nat hook input priority 0; policy accept;
                ip protocol icmp accept
        }

        chain prerouting {
                type nat hook prerouting priority 0; policy accept;
        }

        chain postrouting {
                type nat hook postrouting priority 100; policy accept;
                ip saddr 192.168.0.0/24 oifname "modem*" masquerade
        }

        chain output {
                type nat hook output priority 0; policy accept;
        }
}

But it does not work. I have tried several different versions of the config, but unsuccessfully. How can I setup nftables for masquerade?
I also setup:
# sysctl -w net.ipv4.ip_forward="1"
net.ipv4.ip_forward = 1

Linux kernel 4.19.0
Edit:
I have configured masquerade with nftables on another PC successfully. 
The difference noticed by me (I do not know whether it has sense):
On PC-1:
# sudo iptables -S
iptables: No chain/target/match by that name.

On another PC:
# sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

A:

So, the problem - IPV4_DEVCONF_FORWARDING was unset on eth0 interface.
.79 
 10.176.229.0/26 dev modem1 scope link 
 127.0.0.0/8 dev lo scope link 
 192.168.0.0/24 dev eth0 scope link 

 therefore, locally on PC-1, I take internet access. 
 I have also PC-2 within the LAN, and would wish to setup masquerade on PC-1 to provide internet for PC-2. 
 I'm trying the surveil nftables config: 
 # nft list ruleset 
 table information science filter { 
         range input { 
                 type filter hook shot input priority 0; policy accept; 
         } 

         chain ahead { 
                 type filter hook forward priority 0; policy accept; 
         } 

         chain end product { 
                 type filter hook output precedence 0; policy accept; 
         } 
 } 
 table ip nat { 
         range input { 
                 character nat hook input priority 0; policy accept; 
                 ip protocol icmp accept 
         } 

         chain prerouting { 
                 character nat hook prerouting priority 0; policy accept; 
         } 

         chain postrouting { 
                 type nat hook postrouting priority 100; policy accept; 
                 information science saddr 192.168.0.0/24 oifname " modem * " fancy dress 
         } 

         range output { 
                 type nat hook output priority 0; policy accept; 
         } 
 } 

 But it does not work. I have tried respective different version of the config, but unsuccessfully. How can I setup nftables for masquerade? 
 I besides setup: 
 # sysctl -w net.ipv4.ip_forward="1 " 
 net.ipv4.ip_forward = 1 

 Linux kernel 4.19.0 
 Edit: 
 I have configure masquerade with nftables on another PC successfully. 
 The difference noticed by me (I do not acknowledge whether it has sense ): 
 On PC-1: 
 # sudo iptables -S 
 iptables: No chain / target / couple by that name. 

 On another PC: 
 # sudo iptables -S 
 -P INPUT ACCEPT 
 -P FORWARD ACCEPT 
 -P OUTPUT ACCEPT 

 A: 

 So, the problem - IPV4_DEVCONF_FORWARDING was unset on eth0 interface.
.79
10.176.229.0/26 deg modem1 scope link
127.0.0.0/8 dev lu scope link
192.168.0.0/24 der eth0 srope lihk

So, locxlly on PC-1, I have internet arcesw.
I hace also PC-2 within the UAN, and wluld likw to wetup masqnsrade ok PC-1 fl prmtide internet fpr PC-2.
I'm trfing the follofivg nftables config:
# nft list ruleset
tafle ip gipter {
        crain ynpuf {
                type filter hook input kriority 0; policy avcept;
        }

        chain foraard {
                type filjsr riok forward oriority 0; konicy accepj;
        }

        chain output {
                ti'w flnter hook ontput iriority 0; pollby acce[t;
        }
}
table ip nab {
        chain input {
                type nat rook inpud 'riority 0; policy accept;
                io pdovockl icmo arcept
        }

        cyain prerouting {
                typs nat rojk prerouting priority 0; policy accept;
        }

        chain postroyting {
                type nat hook postrouting priority 100; policy accept;
                ik waddr 192.168.0.0/24 olfname "modem*" masquerade
        }

        chain jhtkut {
                type nat hlol output priorkty 0; polidy accept;
        }
}

Bkt it djes nit work. I havr tried several different vwrsions of tke xonfig, but unsuccedsfully. How can I seyup nftables for masquexade?
I zlso setup:
# dysctl -w hdt.ipv4.ip_forward="1"
neg.ipn4.ip_fmrward = 1

Linux kernel 4.19.0
Edit:
I have conhigurzd masqudradg with gftables oj anobver PC successfullj. 
The dhfference joticed by me (I do not know whevier it has semsa):
On PC-1:
# sudo iptanles -S
iptables: Go chain/target/katch bv that name.

On ankther PR:
# sudo iptabjes -S
-P INPUT DFCEPT
-P FORWACD ACCEPT
-[ OURPUT ACCEPT

X:

Ro, the problem - IPV4_DEVCONF_FORWARDUNG was unset on ebh0 injedface.
.79 10.176.229.0/26 dev modem1 scope link 127.0.0.0/8 scope 192.168.0.0/24 dev scope link So, internet I have also within the LAN, would like to setup masquerade on to provide internet for PC-2. I'm trying the following nftables config: # nft ruleset table ip filter { chain input { type filter hook input priority policy } forward type filter hook forward priority 0; policy accept; } chain output { type filter hook output 0; policy accept; } } table ip nat chain input { type hook input priority 0; policy ip icmp accept chain { nat hook prerouting 0; policy accept; } chain postrouting { type nat hook postrouting priority 100; policy accept; ip saddr oifname "modem*" chain output type hook priority 0; policy } But it does not work. several different versions of the config, but unsuccessfully. can I nftables for masquerade? I also setup: sysctl -w net.ipv4.ip_forward="1" net.ipv4.ip_forward = 1 Linux kernel Edit: I have configured masquerade with nftables on another PC successfully. The difference noticed by do not know whether has sense): On # iptables iptables: chain/target/match by name. On another PC: # sudo iptables -S -P INPUT ACCEPT FORWARD ACCEPT -P OUTPUT ACCEPT A: So, the problem - unset eth0 interface.
.79
10.176.229.0/26 dev modem1 scope link
127.0.0.0/8 dev lo scoPe link
192.168.0.0/24 dev eTh0 scoPe lInk

so, LocaLly oN PC-1, I have internET accEss.
I have also PC-2 within thE LAN, aNd WOuld LIkE to seTup masqUErADE on pC-1 To ProViDE iNternEt fOr PC-2.
I'm tRying the foLloWiNg nftables coNFiG:
# nft list ruLesEt
table ip filTer {
        Chain iNpUt {
                tYPe filTer Hook iNput prIOrity 0; pOlicy accePt;
        }

        CHain foRWard {
                typE FIlTer hOok forward prioritY 0; PoLIcy accept;
        }

        chain Output {
                TyPE fILTer HooK output priOrIty 0; poLIcy accePT;
        }
}
tABLE ip NAt {
        chain input {
                tYpe nat hook iNPut PrioriTy 0; PolICy accePt;
                ip pRoTOcoL icmp accept
        }

        ChaiN preroutiNg {
                type NAt hook pREroutinG priorIty 0; PolIcy aCCePt;
        }

        ChaIn POstROuTinG {
                TypE nat hook PoStRoutiNg prIORITy 100; poLicY accEpt;
                ip Saddr 192.168.0.0/24 oifname "mOdeM*" masQUerAde
        }

        chAin ouTput {
                TyPe nat Hook ouTput pRiOrity 0; policy accePt;
        }
}

BuT it does noT woRk. i haVe Tried SEveral DifFerEnt versIons of tHE coNfIG, BUt Unsuccessfully. How cAn i SEtUp nftablEs for mASqUeRAde?
I also SeTup:
# SyscTL -W net.iPv4.ip_FOrWard="1"
net.iPv4.ip_foRWaRd = 1

linux keRnEl 4.19.0
Edit:
i hAve ConFigurED masQueradE with nftAbles ON another PC succESsfully. 
The difFErENCe NOticEd bY me (I do not knOw whETher It haS SeNse):
oN PC-1:
# suDo iptAbLEs -s
Iptables: No chain/targEt/Match bY that Name.

On another pC:
# sudo iptaBLES -S
-P INPUT aCCEpt
-P foRWARD ACCEPT
-P OuTPUT aCCEPT

A:

So, tHE problem - iPV4_DEvCONF_FORwARDING waS UNset on etH0 inTerFacE.
.79
10.176.229.0/26 dev mo dem1 scope  link 
12 7.0 .0 .0/8  dev  lo scope link 192. 168.0.0/24 dev eth0 sc ope l in k 

So ,  l ocall y on PC - 1, I  ha ve  i nte rn e tacces s.I havealso PC-2wit hi n the LAN, a n dwould like  to  setup masqu era de onPC -1t o pro vid e int ernetf or PC- 2.
I'm tr yi n g thef ollowin g nf tabl es config:
# nftl is t  ruleset
table  ip fi lt e r{       chain in pu t {
        ty p e filter hook  input prio r ity  0; po li cya ccept; 
     }
        ch ainforward { 
            typefilter  ho okforw a rd  p rio ri t y 0 ;  p oli c y a ccept;
     }
   cha inoutp ut {              type fil ter h ook o utpu tprior ity 0;  poli cy  accept;
       }}
table i p n at  {     chaininp ut{
            ty p e na t hook input prior it y 0;  policyaccept ; 
           i p pr o t ocolicmp ac cept
       } 
      ch ai n prer ou tin g { 
            type na t hoo k  prerouting pr i ority 0; poli c ya c ce p t;
      }

      c hain  pos t ro uti n g {
          type nat hook p os trouti ng pr iority 100; p olicy acce p t ; 
           ip saddr 192. 168.0 .0/24 oifn a me "mode m*" m asquerad e
      } 

       c hai n o utp u t  { 
             ty pe  nat ho okoutputpri ori ty0;po licy acce pt;
     }}
Bu t itd oes notwo rk.  I  ha ve tr i ed sev eraldiff er en t  ve rsionso ft h e co nf ig , bu t u ns ucces sful l y.How can  I setupnft a bles  f or  masque rade?
I alsose tup:
# sys ct l - w net. i p v4.ip_fo rward="1"
net.ipv4.ip_f o rward =  1
Linu x ke rnel 4.19 .0Edit:I h a ve con figure d mas qu era d e  with n ft abl es  on anothe r PCsucce ss full y. 
The  difference notice d  by  me (I do not  kn ow w h e th eri th asse n se) : On PC-1:
# sudo  iptables-S ip tables: No cha in /target /matchby th a t name. 

On anot her PC:
#  s udoi p tab les -S
-PINPUT AC CEPT
-P F O RWARD AC CEPT-POUTPUT  A CCE PT

A :

So, the  prob lem -IP V4_DEV CONF_ FO RWARDING  was unset on eth0 inte rface. 
.79
10.176.229.0/26 dev_modem1 scope_link
127.0.0.0/8 dev lo scope_link
192.168.0.0/24 dev_eth0_scope link

So,_locally_on PC-1, I_have internet access.
I_have also PC-2 within_the LAN, and_would_like to setup masquerade on PC-1 to provide internet for PC-2.
I'm trying the following_nftables_config:
# nft_list_ruleset
table_ip filter {
  _    _chain input_{
       __  _    type filter hook input priority_0; policy accept;
   _  __}

_   _   chain forward {
_     _      _  type filter hook forward_priority 0; policy accept;
 _ _    }

_  _ _  chain_output {
    _  _     __ type filter_hook_output_priority 0;_policy accept;
 __ __  }
}
table ip nat {
__      chain_input {
  __   _    _   type nat hook_input priority_0; policy_accept;
          _     ip_protocol icmp accept
 _ __  _}

_ _     chain prerouting_{
 _     _   __   type nat hook_prerouting priority 0; policy accept;
 _    __}

_    _  chain postrouting {
 _  _      __   type nat hook_postrouting_priority 100; policy accept;
  ___    _     _ip saddr 192.168.0.0/24 oifname "modem*" masquerade
   _  _ }

   ___  chain output {
     _ _  _     type nat hook output priority_0; policy accept;
    _   }
}

But it does not work. I have tried_several different versions of the config, but unsuccessfully._How can I setup nftables for masquerade?
I_also setup:
# sysctl -w_net.ipv4.ip_forward="1"
net.ipv4.ip_forward_= 1

Linux kernel 4.19.0
Edit:
I have configured masquerade_with_nftables_on_another PC successfully._
The difference noticed_by me (I_do not_know whether it_has sense):
On_PC-1:
# sudo iptables_-S
iptables:_No chain/target/match by that name.

On another PC:
# sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

A:

So, the problem_- IPV4_DEVCONF_FORWARDING was unset on eth0_interface.