Score:0

internet not working after executing the below iptable commands as root

in flag

Inorder To increase security i executed the below commands

Force SYN packets check

Make sure NEW incoming tcp connections are SYN packets; otherwise we need to drop them:

iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP

Force Fragments packets check

Packets with incoming fragments drop them. This attack result into Linux server panic such data loss.

iptables -A INPUT -f -j DROP

XMAS packets

Incoming malformed XMAS packets drop them:

iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP

Drop all NULL packets

Incoming malformed NULL packets:

iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP

I got this commands from here.

Now System showing Wire Connected but with ? symbol over the icon and internet isn't working I'm using Ubuntu 21.04. Please let me know how to undo this

Nmath avatar
ng flag
I see a much bigger problem... Did you notice that the page you linked was last updated in **2005**? How did you find this information and how did you determine it was safe, authoritative, practical, and necessary?
Purna Mahesh avatar
in flag
I can use time shift but i have to do so many installations and configurations.
Nmath avatar
ng flag
Do you have a backup of your iptables before these adjustments?
Nmath avatar
ng flag
If your other configurations are like these, maybe you shouldn't
Purna Mahesh avatar
in flag
I never heard about iptables before an hour ago. So i didn't
Score:0
gn flag

The iptables rules you entered should not have caused internet to stop working, so there may be some context you haven't shared with us. Perhaps some previous rules from UFW or elsewhere where these added rules mess up.

To undo your situation, you can either flush the rule set or back out one at a time. Backing out one at a time might allow you to determine which rule broke your internet access.

Starting from your added rules:

doug@s19:~/prime95$ sudo iptables -xvnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
      20      820 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:!0x17/0x02 state NEW
       0        0 DROP       all  -f  *      *       0.0.0.0/0            0.0.0.0/0
       0        0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x3F/0x3F
       0        0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x3F/0x00

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

For the backout method just change your "Append" directive to a "Delete" directive and re-enter the rule:

doug@s19:~/prime95$ sudo iptables -D INPUT -p tcp --tcp-flags ALL NONE -j DROP

And now:

doug@s19:~/prime95$ sudo iptables -xvnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
      20      820 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:!0x17/0x02 state NEW
       0        0 DROP       all  -f  *      *       0.0.0.0/0            0.0.0.0/0
       0        0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x3F/0x3F

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Repeat for all your rules:

doug@s19:~/prime95$ sudo iptables -D INPUT -p tcp --tcp-flags ALL ALL -j DROP
doug@s19:~/prime95$ sudo iptables -D INPUT -f -j DROP
doug@s19:~/prime95$ sudo iptables -D INPUT -p tcp ! --syn -m state --state NEW -j DROP
doug@s19:~/prime95$ sudo iptables -xvnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.