Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


migration_temporary_redirect

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
migration_temporary_redirect [2015/04/07 16:06] adminmigration_temporary_redirect [2021/10/09 15:14] (current) – external edit 127.0.0.1
Line 1: Line 1:
 {{tag>[iptables networking linux]}} {{tag>[iptables networking linux]}}
-~~TOC~~ 
 =====Temporary redirect traffic to other host===== =====Temporary redirect traffic to other host=====
 I've used the steps below to temporary redirect IP traffic, during migration to another host. Tested on CentOS 6.x I've used the steps below to temporary redirect IP traffic, during migration to another host. Tested on CentOS 6.x
Line 8: Line 7:
   * Allow forwarding: <code>iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT   * Allow forwarding: <code>iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
 iptables -A FORWARD -p tcp -d 2.2.2.2 --dport 443 -j ACCEPT</code> iptables -A FORWARD -p tcp -d 2.2.2.2 --dport 443 -j ACCEPT</code>
-  * Masquerade outgoing connection:<code>iptables -t nat -A POSTROUTING -j MASQUERADE</code>+  * Masquerade outgoing connections:<code>iptables -t nat -A POSTROUTING -j MASQUERADE</code>
   * Show active rules:<code>iptables -nvL -t nat</code>   * Show active rules:<code>iptables -nvL -t nat</code>
   * Delete rules:   * Delete rules:
migration_temporary_redirect.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1