[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

sie,chih-wei updated CLOUDSTACK-4535:
-------------------------------------

    Description: 
When a client on the same internal network as the Port Forwarding requests a 
connection to the service's public IP address & port , the connection breaks.

EX : Port Forwarding for TCP Public_IP:1234 to Private_IP:22
a client(in private network) do => $ssh root@Public_IP -p 1234 => $ ...time out 
...

Solution : In Virtual Router do
$ sudo iptables -t nat -D POSTROUTING -s Private_CIDR -p tcp --dport 
1234(public port) -d Private_IP -j SNAT -o eth0 --to-source
$ sudo iptables -t nat -I POSTROUTING -s Private_CIDR -p tcp --dport 22(private 
port) -d Private_IP -j SNAT -o eth0 --to-source

https://github.com/apache/cloudstack/blob/master/patches/systemvm/debian/config/root/firewall.sh
74 : (sudo iptables -t nat $op POSTROUTING -s $vrGuestIPNetwork -p $prot 
--dport ***$port*** -d $guestVmIp -j SNAT -o eth0 --to-source $vrGuestIP &>> 
$OUTFILE || [ "$op" == "-D" ])
have to change ??  =>
(sudo iptables -t nat $op POSTROUTING -s $vrGuestIPNetwork -p $prot --dport 
***$guestPort*** -d $guestVmIp -j SNAT -o eth0 --to-source $vrGuestIP &>> 
$OUTFILE || [ "$op" == "-D" ])

Thanks.

  was:
When a client on the same internal network as the Port Forwarding requests a 
connection to the service's public IP address & port , the connection breaks.

EX : Port Forwarding for TCP Public_IP:1234 to Private_IP:22
a client(in private network) do => $ssh root@Public_IP -p 1234 => $ ...time out 
...

Soulation : In Virtual Router do
$ sudo iptables -t nat -D POSTROUTING -s Private_CIDR -p tcp --dport 
1234(public port) -d Private_IP -j SNAT -o eth0 --to-source
$ sudo iptables -t nat -I POSTROUTING -s Private_CIDR -p tcp --dport 22(private 
port) -d Private_IP -j SNAT -o eth0 --to-source

https://github.com/apache/cloudstack/blob/master/patches/systemvm/debian/config/root/firewall.sh
74 : (sudo iptables -t nat $op POSTROUTING -s $vrGuestIPNetwork -p $prot 
--dport ***$port*** -d $guestVmIp -j SNAT -o eth0 --to-source $vrGuestIP &>> 
$OUTFILE || [ "$op" == "-D" ])
have to change ??  =>
(sudo iptables -t nat $op POSTROUTING -s $vrGuestIPNetwork -p $prot --dport 
***$guestPort*** -d $guestVmIp -j SNAT -o eth0 --to-source $vrGuestIP &>> 
$OUTFILE || [ "$op" == "-D" ])

Thanks.

    
> In Virtual Router Port Forwarding Service, the connection is not established 
> when client on the same private network
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4535
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4535
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Virtual Router
>    Affects Versions: pre-4.0.0, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1
>         Environment: cs4.1.1
>            Reporter: sie,chih-wei
>            Priority: Minor
>             Fix For: Future, 4.2.1
>
>
> When a client on the same internal network as the Port Forwarding requests a 
> connection to the service's public IP address & port , the connection breaks.
> EX : Port Forwarding for TCP Public_IP:1234 to Private_IP:22
> a client(in private network) do => $ssh root@Public_IP -p 1234 => $ ...time 
> out ...
> Solution : In Virtual Router do
> $ sudo iptables -t nat -D POSTROUTING -s Private_CIDR -p tcp --dport 
> 1234(public port) -d Private_IP -j SNAT -o eth0 --to-source
> $ sudo iptables -t nat -I POSTROUTING -s Private_CIDR -p tcp --dport 
> 22(private port) -d Private_IP -j SNAT -o eth0 --to-source
> https://github.com/apache/cloudstack/blob/master/patches/systemvm/debian/config/root/firewall.sh
> 74 : (sudo iptables -t nat $op POSTROUTING -s $vrGuestIPNetwork -p $prot 
> --dport ***$port*** -d $guestVmIp -j SNAT -o eth0 --to-source $vrGuestIP &>> 
> $OUTFILE || [ "$op" == "-D" ])
> have to change ??  =>
> (sudo iptables -t nat $op POSTROUTING -s $vrGuestIPNetwork -p $prot --dport 
> ***$guestPort*** -d $guestVmIp -j SNAT -o eth0 --to-source $vrGuestIP &>> 
> $OUTFILE || [ "$op" == "-D" ])
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to