{"action":"opened","issue":{"url":"https://api.github.com/repos/puphpet/puphpet/issues/2402","repository_url":"https://api.github.com/repos/puphpet/puphpet","labels_url":"https://api.github.com/repos/puphpet/puphpet/issues/2402/labels{/name}","comments_url":"https://api.github.com/repos/puphpet/puphpet/issues/2402/comments","events_url":"https://api.github.com/repos/puphpet/puphpet/issues/2402/events","html_url":"https://github.com/puphpet/puphpet/issues/2402","id":169387328,"number":2402,"title":"Firewall rules not being created for Port Forwarding","user":{"login":"Deleugpn","id":9533181,"avatar_url":"https://avatars.githubusercontent.com/u/9533181?v=3","gravatar_id":"","url":"https://api.github.com/users/Deleugpn","html_url":"https://github.com/Deleugpn","followers_url":"https://api.github.com/users/Deleugpn/followers","following_url":"https://api.github.com/users/Deleugpn/following{/other_user}","gists_url":"https://api.github.com/users/Deleugpn/gists{/gist_id}","starred_url":"https://api.github.com/users/Deleugpn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deleugpn/subscriptions","organizations_url":"https://api.github.com/users/Deleugpn/orgs","repos_url":"https://api.github.com/users/Deleugpn/repos","events_url":"https://api.github.com/users/Deleugpn/events{/privacy}","received_events_url":"https://api.github.com/users/Deleugpn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-04T14:25:35Z","updated_at":"2016-08-04T14:25:35Z","closed_at":null,"body":"I just added two new ports to my PuPHPet **config.yaml** as follows:\r\n\r\n```\r\n    vflnp_fajlkhsdkfl:\r\n        host: '9876'\r\n        guest: '9876'\r\n    vflnp_akjfhsdasffa:\r\n        host: '3011'\r\n        guest: '3011'\r\n```\r\n\r\nAnd they do show up when turning on the machine\r\n\r\n```\r\n    Bringing machine 'local' up with 'virtualbox' provider...\r\n    ==> local: Checking if box 'puphpet/centos65-x64' is up to date...\r\n    ==> local: Clearing any previously set network interfaces...\r\n    ==> local: Preparing network interfaces based on configuration...\r\n        local: Adapter 1: nat\r\n        local: Adapter 2: hostonly\r\n    ==> local: You are trying to forward to privileged ports (ports <= 1024). Most\r\n    ==> local: operating systems restrict this to only privileged process (typically\r\n    ==> local: processes running as an administrative user). This is a warning in ca                                                                                                                                                                                               se\r\n    ==> local: the port forwarding doesn't work. If any problems occur, please try a\r\n    ==> local: port higher than 1024.\r\n    ==> local: Forwarding ports...\r\n        local: 3306 (guest) => 3306 (host) (adapter 1)\r\n        local: 80 (guest) => 80 (host) (adapter 1)\r\n        local: 8000 (guest) => 8000 (host) (adapter 1)\r\n        local: 9876 (guest) => 9876 (host) (adapter 1)\r\n        local: 3011 (guest) => 3011 (host) (adapter 1)\r\n        local: 22 (guest) => 2222 (host) (adapter 1)\r\n    ==> local: Running 'pre-boot' VM customizations...\r\n    ==> local: Booting VM...\r\n    ==> local: Waiting for machine to boot. This may take a few minutes...\r\n        local: SSH address: 127.0.0.1:2222\r\n        local: SSH username: vagrant\r\n        local: SSH auth method: private key\r\n```\r\n\r\nThey're also listed by Virtual Box\r\n\r\nhttp://i.stack.imgur.com/qFSk8.png\r\n\r\nBut when trying to establish connection in those new ports, they just get dropped by iptables. I know this because running **iptables -F** instantly resolves the problem until the next reboot.\r\n\r\n```\r\n    # iptables -L -n\r\n    Chain INPUT (policy ACCEPT)\r\n    target     prot opt source               destination\r\n    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           /* 000 accept all icmp */\r\n    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           /* 001 accept all to lo interface */\r\n    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           /* 002 accept related established rules */ state RELATED,ESTABLISHED\r\n    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           multiport ports 22 /* 100 tcp/22 */\r\n    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           multiport ports 3306 /* 100 tcp/3306 */\r\n    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           multiport ports 443 /* 100 tcp/443 */\r\n    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           multiport ports 80 /* 100 tcp/80 */\r\n    DROP       all  --  0.0.0.0/0            0.0.0.0/0           /* 999 drop all */\r\n```\r\n\r\nWhy isn't rules for **8000**, **9876**, **3011** being created on **iptables**?\r\n"}}
{"actor":{"display_login":"Deleugpn"}}