generated from mmistakes/mm-github-pages-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update smartnic network configuration
- Loading branch information
1 parent
aa378be
commit 5db6bbf
Showing
6 changed files
with
102 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
permalink: /notes/linux/iptables/ | ||
title: "Iptables" | ||
sidebar: | ||
nav: "linux" | ||
--- | ||
`iptables` is a powerful tool for managing firewall rules, NAT and other network functions. | ||
|
||
Note: | ||
- Never use any command to delete all rules or a single rule without checking in ``iptable``, especially for rules relating to | ||
**gateways, ssh protocol, packet drop**. It may make a remote server forever out of reach unless on-site resetting. | ||
- Rules in the same table are **checked from rule number 1 to the last rule one by one**. Since the last rule in a table is usually "drop all packets", adding rules after the last rule is meaningless. | ||
|
||
# Commands | ||
## View Rules | ||
```console | ||
# view rules in INPUT, OUTPUT, FORWARDING table | ||
sfwu22@proj88:~$ sudo iptables -nvL --line-number | ||
... | ||
# view rules in nat table | ||
sfwu22@proj88:~$ sudo iptables -t nat -nvL --line-number | ||
``` | ||
|
||
## Add/Insert Rules | ||
```console | ||
# add rules to the end of a table | ||
sfwu22@proj88:~$ sudo iptables -nvL --line-number | ||
... | ||
# insert rule into a table | ||
sfwu22@proj88:~$ sudo iptables -t nat -nvL --line-number | ||
``` | ||
|
||
## Delete Rules | ||
```console | ||
# delete rule number 1 from INPUT chain | ||
sfwu22@proj88:~$ sudo iptables -D FORWARD 1 | ||
|
||
# delete rule number 1 from nat table POSTROUTING chain | ||
sfwu22@proj88:~$ sudo iptables -t nat -D POSTROUTING 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
permalink: /notes/linux | ||
permalink: /notes/linux/ | ||
title: "Linux Notes" | ||
sidebar: | ||
nav: "linux" | ||
--- | ||
|
||
**Notes about ![](https://img.shields.io/badge/Linux-FCC624?style=flat-square&logo=Linux&logoColor=white) ** | ||
**Notes about ![](https://img.shields.io/badge/Linux-FCC624?style=flat-square&logo=Linux&logoColor=white).** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
permalink: /study/ | ||
permalink: /notes/ | ||
title: "Notes" | ||
sidebar: | ||
nav: "study" | ||
|