SCIENTIFIC-LINUX-USERS Archives

July 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Todd And Margo Chester <[log in to unmask]>
Reply To:
Todd And Margo Chester <[log in to unmask]>
Date:
Sat, 9 Jul 2011 00:22:56 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (244 lines)
On 07/05/2011 04:07 PM, Yasha Karant wrote:
> On 07/05/2011 12:56 PM, Todd And Margo Chester wrote:
>> On 07/04/2011 10:04 PM, Yasha Karant wrote:
>>> On 07/03/2011 05:34 PM, Todd And Margo Chester wrote:
>>>>
>>>>>
>>>>> On 07/01/2011 07:48 PM, Todd And Margo Chester wrote:
>>>>>> On 07/01/2011 07:06 PM, William Scott wrote:
>>>>>>> On 27 June 2011 02:27, Larry 
>>>>>>> Linder<[log in to unmask]>
>>>>>>> wrote:
>>>>>>>> Hate to be a complainer, but stuff that has worked well for 20 
>>>>>>>> years
>>>>>>>> is now
>>>>>>>> broken again. This is the second time in less than a year.
>>>>>>>>
>>>>>>> Saw this today...
>>>>>>>
>>>>>>> http://scientificlinuxforum.org/index.php?showtopic=183
>>>>>>>
>>>>>>> More lp than lpr related.
>>>>>>>
>>>>>> Hi Larry,
>>>>>>
>>>>>> I noticed in one of your prior posting that you did not want to 
>>>>>> world
>>>>>> to see your printer, just your VM.
>>>>>>
>>>>>> I have a similar situation where I have a Windows 2003 Terminal
>>>>>> Server running as a VM on a CentOS 5.6 x64 server. I don't want
>>>>>> any of its traffic going anywhere but to the server and I limit
>>>>>> that as well with my firewall. The way I do it is to create a fake
>>>>>> Ethernet port called a Virtual Port. In my case it is eth0.5.
>>>>>>
>>>>>> If you want to go this way, let me know and I will copy the list
>>>>>> my ifcfg-eth0.5 to give you a head start.
>>>>>>
>>>>>> I do believe you can tell CUPS to only allow printing from
>>>>>> 127.0.0.1 and eth0.5. There is a trick to this, so if you decide
>>>>>> to go the LPR/LPD route, also drop me a line and I will sent the
>>>>>> list my notes on the issue.
>>>>>>
>>>>>> HTH,
>>>>>> -T
>>>>>>
>>>>>> By the way, I install LPR on XP and print to CUPS-LPD
>>>>>
>>>>>
>>>> On 07/02/2011 03:35 PM, Yasha Karant wrote:
>>>>> Could you email me the relevant configuration files? What you 
>>>>> describe
>>>>> functionally is what VMWare workstation automagically did, but which
>>>>> must be manually configured for VirtualBox.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Yasha Karant
>>>>
>>>> Hi Yasha,
>>>>
>>>> I am presuming you are looking for the virtual network configuration.
>>>> Basically, you create a new ifcfg file in
>>>> /etc/sysconfig/network-scripts. The
>>>> "VLAN=yes" statement is what does the virtual network adapter magic.
>>>>
>>>> I am using a fixed IP. You can use DHCP if you like. To all the world
>>>> it looks like an addition network card. Make sure "DEVICE=" matches
>>>> the name in "ifcfg-xxx". The first half of the "XXX=sss" must be
>>>> all caps.
>>>>
>>>> Once you get the new ifcfg-xxx file in place, you can restart 
>>>> "network",
>>>> but I prefer to reboot.
>>>>
>>>> You may want to set "PEERDNS=yes" if you are not using your own
>>>> local DNS.
>>>>
>>>> Let me know if you need any help with LPR/LPD. There are some tricks
>>>>
>>>> -T
>>>>
>>>>
>>>> ------ /etc/sysconfig/network-scripts/ifcfg-eth0.5 -------
>>>> #DEVICE=ifcfg-eth0.5
>>>> DEVICE=eth0.5
>>>> BOOTPROTO=none
>>>> BROADCAST=192.168.254.255
>>>> IPADDR=192.168.254.10
>>>> NETMASK=255.255.255.0
>>>> NETWORK=192.168.254.0
>>>> GATEWAY=192.168.254.10
>>>> ONBOOT=yes
>>>> USERCTL=yes
>>>> IPV6INIT=no
>>>> PEERDNS=no
>>>> PROMISC=yes
>>>> TYPE=Ethernet
>>>> VLAN=yes
>>>>
>>>>
>>>>
>>>>
>>>
>>> My guess is that the vboxnet ethernet interface that can be created by
>>> the appropriate configuration of VirtualBox virtual network interfaces
>>> and that shows up on ifconfig -a (after such configuring) is very
>>> similar to what you have provided. However, what I need to know is how
>>> to advertise/permit an existing direct attached printer to also be
>>> made available to this internal, non-externally-visible "network" so
>>> that the VirtualBox guest (in my case, currently MS Win XP Pro SP 3)
>>> can use the internal-network to send print jobs to the printer without
>>> interfering with the regular use of the printer by the Linux host
>>> (controlling the printer under CUPS).
>>>
>>> Thanks,
>>>
>>> Yasha Karant
>>>
>> Hi Yasha,
>>
>> I see. I did not give you anywhere enough information
>> to do what you need. Give me a few days and I will
>> get you what you need. If you figure it out in the mean
>> time, let me know.
>>
>> -T
>
> Hi Todd,
>
> Is the attached PDF essentially what you have done?
>
> Thanks,
>
> Yasha

Hi Yasha,

You made me "organize" my thoughts.  Feels weird!


0) pat you monitor gently and ask your computer's forgiveness
for installing Windows on it.  And for accusing its parents of not being
married.  Computers have long memories and are very vindictive.
(I think I am funny -- there are worse vices.)   :-)


1) Linux networking: create a virtual Ethernet adapter.  Modify to
the following to your taste:

------ /etc/sysconfig/network-scripts/ifcfg-eth0.5 -------
#DEVICE=ifcfg-eth0.5
DEVICE=eth0.5
BOOTPROTO=none
BROADCAST=192.168.254.255
IPADDR=192.168.254.10
NETMASK=255.255.255.0
NETWORK=192.168.254.0
GATEWAY=192.168.254.10
ONBOOT=yes
USERCTL=yes
IPV6INIT=no
PEERDNS=no
PROMISC=yes
TYPE=Ethernet
VLAN=yes
#DNS1=208.67.222.222
#DNS2=208.67.220.220

reboot and run "ifconfig -a" to make sure it took.   You
"may" get away with restarting "networking".  I'd just
reboot.


2) Virtual Box console:

Go into the settings of your guest and change Adapter 1
to "Bridge Networking".  For the "name", use the pull down
and select your virtual adapter (eth0.5 in my example).


3) Cups:
   A) set up your printer.
   B) Edit /etc/cups/cupsd.conf

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.254.*
</Location>

Make sure the second "Allow FROM" is the IP for your virtual
adapter (192.168.254.* is from the example)

   C) install cups-lpd:
          yum install cups-lpd

   D) Edit /etc/xinetd.d/cups-lpd:
             disable = no

       Then reboot.  (I have tried restarting things.  Learn from my
       pain, just reboot)


4)  XP Guest:

    A) install LPR printing:

        --> Control Panel
          --> Add/Remote Programs
            --> Add remove Widows Component (button on left column)
              --> check off "Other file and network print services"

         You will need your XP install disk's :\i386 directory handy.  I 
copy
         mine to my c:\ drive

     B) Create an LPR port for your printer
           --> Control Panel
             --> Printers and Faxes (Do not highlight any of them!)
               --> File, Server properties
                 --> Ports (tab at top)
                   --> add port, LPR port
           For the IP, use your virtual port's IP address
           For the name, give it the exact name it is know as in CUPS

     C)  install your printer driver:
           --> Control Panel
             --> Printers and Faxes
               --> "add a printer" (button on upper left, or use right 
click context menu)
                 -->  next and select "Local printer attached to this 
computer"
                   --> next and "use the following port".  The pull down 
will have the LPR
                         port you created above.
                      --> finish installing your printer

      D) test you printer!


Hope this helps!  Let me know if you have any questions.
-T

ATOM RSS1 RSS2