VMware Cloud Community
listener
Contributor
Contributor
Jump to solution

Firewall: How to open a port that is tcp in and out in one line

How can you combine the firewall command to open port 80 on tcp in and tcp out without having to issue it twice?

esxcfg-firewall -o 80,tcp,in,web

esxcfg-firewall -o 80,tcp,out,web

Reply
0 Kudos
1 Solution

Accepted Solutions
AntonVZhbankov
Immortal
Immortal
Jump to solution

No. Because it's completely different situation.

When you open in port - you allow to access port 80 on local machine from the network. When you open out port - you allow to access port 80 on remote machines from the local machine. Usually there is no need to open both in and out ports.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda

View solution in original post

Reply
0 Kudos
2 Replies
vmroyale
Immortal
Immortal
Jump to solution

Hello.

Try using the & symbol to combine the two commands:

esxcfg-firewall -o 80,tcp,in,web & esxcfg-firewall -o 80,tcp,out,web

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
AntonVZhbankov
Immortal
Immortal
Jump to solution

No. Because it's completely different situation.

When you open in port - you allow to access port 80 on local machine from the network. When you open out port - you allow to access port 80 on remote machines from the local machine. Usually there is no need to open both in and out ports.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
Reply
0 Kudos