I'm trying to set up a VNC server using the instructions at
http://www.techrepublic.com/blog/linux-and-open-source/linux-101-easy-vnc-server-setup/
.
I am up to step 6:
Step 6: Edit iptables
In order for the VNC connections to get through, you must allow them with
iptables. To do this, open up the file /etc/sysconfig/iptables and add the
line:
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports
5901:5903,6001:6003 -j ACCEPT
Save the file and restart iptables with the command:
service iptables restart
When I issue the restart command I get:
iptables: Applying firewall rules: iptables-restore: line 1 failed
                                                           [FAILED]
Note that I did not have an iptables file before but there is
an iptables-config file.
Can someone help me complete this configuration.
Thanks!
-larry
On Fri, 2013-10-11 at 15:18 -0600, Larry Martell wrote:> I'm trying to set up a VNC server using the instructions at > http://www.techrepublic.com/blog/linux-and-open-source/linux-101-easy-vnc-server-setup/ > . > > I am up to step 6: > > Step 6: Edit iptables > > In order for the VNC connections to get through, you must allow them with > iptables. To do this, open up the file /etc/sysconfig/iptables and add the > line: > > -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports > 5901:5903,6001:6003 -j ACCEPT > > Save the file and restart iptables with the command: > > service iptables restart > > When I issue the restart command I get: > > iptables: Applying firewall rules: iptables-restore: line 1 failed > [FAILED] > > Note that I did not have an iptables file before but there is > an iptables-config file. > > Can someone help me complete this configuration. > > Thanks! > -larry > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centosCan you post the content of the file, I just edit the config file and I didn't get any errors when I issue the command $ sudo /sbin/service iptables restart -- Kind Regards Earl Ramirez GPG Key: http://trinipino.com/PublicKey.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 316 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20131011/651b98a3/attachment-0004.sig>
On Fri, Oct 11, 2013 at 3:30 PM, Earl Ramirez <earlaramirez at gmail.com>wrote:> > On Fri, 2013-10-11 at 15:18 -0600, Larry Martell wrote: > > I'm trying to set up a VNC server using the instructions at > > > http://www.techrepublic.com/blog/linux-and-open-source/linux-101-easy-vnc-server-setup/ > > . > > > > I am up to step 6: > > > > Step 6: Edit iptables > > > > In order for the VNC connections to get through, you must allow them with > > iptables. To do this, open up the file /etc/sysconfig/iptables and add > the > > line: > > > > -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports > > 5901:5903,6001:6003 -j ACCEPT > > > > Save the file and restart iptables with the command: > > > > service iptables restart > > > > When I issue the restart command I get: > > > > iptables: Applying firewall rules: iptables-restore: line 1 failed > > [FAILED] > > > > Note that I did not have an iptables file before but there is > > an iptables-config file. > > > > Can someone help me complete this configuration. > > Can you post the content of the file, I just edit the config file and I > didn't get any errors when I issue the command > > $ sudo /sbin/service iptables restart > >As I wrote, there was no iptables file. I created one with just that one line: -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
I had posted last week about trying to get VNC working. I was never
successful nor were multiple admins. But we realized that all the hosts we
tried on were VMs. We followed the same procedure (
http://wiki.centos.org/HowTos/VNC-Server) on a machine with physical HW and
it worked with no problem. But on the VM I can connect, but I don't get any
window displayed. Here is what is in the log:
Sat Oct 19 18:39:55 2013
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5902
 vncext:      created VNC server for screen 0
GNOME_KEYRING_SOCKET=/tmp/keyring-Y6Tg3c/socket
SSH_AUTH_SOCK=/tmp/keyring-Y6Tg3c/socket.ssh
GNOME_KEYRING_PID=19728
Failed to play sound: File or data not found
** (nm-applet:19775): WARNING **: <WARN>  request_name(): Could not
acquire
the NetworkManagerUserSettings service.
  Error: (9) Connection ":1.552" is not allowed to own the service
"org.freedesktop.NetworkManagerUserSettings" due to security policies
in
the configuration file
19/10/2013 06:39:59 PM Autoprobing TCP port in (all) network interface
19/10/2013 06:39:59 PM Listening IPv{4,6}://*:5900
19/10/2013 06:39:59 PM Autoprobing selected port 5900
19/10/2013 06:39:59 PM Advertising authentication type: 'VNC
Authentication' (2)
19/10/2013 06:39:59 PM Advertising security type: 'VNC Authentication'
(2)
(polkit-gnome-authentication-agent-1:19796): GLib-GObject-WARNING **:
cannot regster existing type `_PolkitError'
(polkit-gnome-authentication-agent-1:19796): GLib-CRITICAL **:
g_once_init_leave: assertion `initialization_value != 0' failed
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
** (gnome-panel:19761): CRITICAL **: panel_applet_frame_change_background:
assertion `PANEL_IS_WIDGET (GTK_WIDGET (frame)->parent)' failed
(polkit-gnome-authentication-agent-1:19796): polkit-gnome-1-WARNING **: No
icon for themed icon with name 'preferences-system-network-proxy'
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with
a timestamp of 0 for 0x2c00003 (Authentica)
Window manager warning: meta_window_activate called by a pager with a 0
timestamp; the pager needs to be fixed.
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with
a timestamp of 0 for 0x2c00003 (Authentica)
Window manager warning: meta_window_activate called by a pager with a 0
timestamp; the pager needs to be fixed.
19/10/2013 06:40:48 PM [IPv6] Got connection from client
::ffff:10.250.151.75
19/10/2013 06:40:48 PM   other clients:
19/10/2013 06:40:49 PM Client Protocol Version 3.7
19/10/2013 06:40:49 PM Advertising security type 2
19/10/2013 06:40:49 PM Client returned security type 2
Anyone have any clues as to what could be wrong and why it works on a
physical host and not on a VM?