Upload files to "/"
This commit is contained in:
1 parent
472785ecfd
commit
2800526719
5 files changed
+48
-8
No files matched your search
@@ -6,6 +6,7 @@ iprt=$1
|
||||
oprt=$2
|
||||
oipa=$3
|
||||
|
||||
## IPTABLES
|
||||
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
#iptables -F
|
||||
#iptables -t nat -F
|
||||
@@ -14,14 +15,15 @@ oipa=$3
|
||||
#sudo iptables -t nat -L -n -v
|
||||
#sudo iptables-persistent
|
||||
|
||||
sudo nft -f /etc/nftables.conf
|
||||
sudo sysctl -w net.ipv4.ip_forward=1
|
||||
sudo sed -i 's/DEFAULT_FORWARD_POLICY="DROP"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw
|
||||
sudo ufw reload
|
||||
sudo nft add table ip nat
|
||||
sudo nft add chain ip nat prerouting { type nat hook prerouting priority -100 \; }
|
||||
sudo nft add chain ip nat postrouting { type nat hook postrouting priority 100 \; }
|
||||
## NFTABLES
|
||||
#sudo nft -f /etc/nftables.conf
|
||||
#sudo sysctl -w net.ipv4.ip_forward=1
|
||||
#sudo sed -i 's/DEFAULT_FORWARD_POLICY="DROP"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw
|
||||
#sudo ufw reload
|
||||
#sudo nft add table ip nat
|
||||
#sudo nft add chain ip nat prerouting { type nat hook prerouting priority -100 \; }
|
||||
#sudo nft add chain ip nat postrouting { type nat hook postrouting priority 100 \; }
|
||||
sudo nft add rule ip nat prerouting tcp dport $iprt dnat to $oipa:$oprt
|
||||
sudo nft add rule ip nat postrouting ip daddr $oipa masquerade
|
||||
#sudo mkdir /etc/nftables/
|
||||
sudo nft list ruleset #| sudo tee /etc/nftables/port-forwarding.nft
|
||||
sudo nft list ruleset #| sudo tee /etc/nftables/port-forwarding.nft
|
||||
Reference in new issue
Block a user