ipf #1

Open
opened 2026-01-14 23:46:27 +00:00 by joe · 0 comments
Owner

一時的にiptablesを使ってポートフォワーディングするだけのツール

毎回下記みたいに書くの面倒くさいのでむしゃくしゃして作った

# http
MYPORT=80
DPORT=80
sudo -u root iptables -t nat -A PREROUTING -d $MYIP -p tcp --dport $DPORT -j DNAT --to-destination $DIP:$DPORT
sudo -u root iptables -A FORWARD -d $DIP -p tcp --dport $DPORT -j ACCEPT
### 一時的にiptablesを使ってポートフォワーディングするだけのツール 毎回下記みたいに書くの面倒くさいのでむしゃくしゃして作った ```sh # http MYPORT=80 DPORT=80 sudo -u root iptables -t nat -A PREROUTING -d $MYIP -p tcp --dport $DPORT -j DNAT --to-destination $DIP:$DPORT sudo -u root iptables -A FORWARD -d $DIP -p tcp --dport $DPORT -j ACCEPT ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: joe/ipf#1
No description provided.