General :: Script To Covert Binary Value Into Subnet Mask?
Feb 11, 2010
for providing an earlier solution from which I have modified and butchered the below script.The intended purpose of this script is to take a subnet mask for example 255.255.255.0 and turn it into the corresponding wildcard mask value in this case it would be /24I have got to the point where I have the binary value, the script is
tasks of an administrative level that we can use Shell Script to automate them. It's a kind of homework for me to figure out how to automate those tasks. Using PHP and Shell Script design and develop a Web Interface to change or set the IP Address and Subnet Mask of the UNIX / Linux System. The related services must be restarted automatically for the new IP Address and Subnet Mask to take effect. No user name and password should be asked for when using that Web Interface. How would you do it?
I am using ubuntu Lucid and connected to a network with windows machines.Our network admin changed some settings in the network, and all machines need to change their subnet masks to access local machines (e.g. I am getting "unable to mount" message when I try to connect other Windows PC's on the network.)
If I open the connections panel, and "Edit" the "Auto eth0", I can get: IPv4 Settings -> Method -> Manual -> Addresses -> Add .And I am pretty sure I will put new subnet mask address into "Netmask" box, what to put others? Namely:
IP Address, Netmask, Gateway and below: DNS Servers, Search Domains
I can get some info about my network connection by right clicking network icon on the panel, and select "Connection Information" Tried to fill manual settings with some of those info (the ones made some sense to me) but I still cannot mount windows network drives, plus my internet connection dies.So, is there any way to change Subnet Mask "ONLY", without touching any other setting.
I have TWO L3 + router switch (say switch1 and switch2). I created VLAN100 with VLAN ID 100 in both the switches. I created router 192.168.1.1/24 in Switch1. I created router 192.168.2.1/24 in Switch2. Switch1 is connected with 1.x/24 PCs. PCs are configured with 1.1 gateway. Switch2 is connected with 2.x/24 PCs. PCs are configured with 2.1 gateway. Both Switch1 and switch2 are connected by a trunk to carry VLAN100 data.
1)I have few PCs of 1.x connected to say Switch1 Is it possible for PC with IP 192.168.1.100(x) to ping PC with IP 192.168.2.100(y)?What are the configuration required in both switches to make them communicate ? All the device in both the subnets should ping/communicate with each other.
2)Move PC (192.168.1.100) to switch2. Move PC (192.168.2.100)to switch1.What will happen when PC(1.100) ping (2.100) and vice versa?What will happen when PC(say 1.80 in switch1) pings PC (say 1.100 in switch2) and vice versa? What will happen when PC(say 1.80 in switch1) pings PC (say 2.100 in switch1) and vice versa?
Is there any Linux tool that will take a SWF file and output some kind of video format? Note that I don't want a tool which will re-encode an embedded FLV or MP4, I want to take a standard Flash movie and render it as a video.I found a reference to dump-gnash in the GNU Manual, but having installed the gnash package on Fedora I don't have that command.
One of the most common qs i see in forums is >>> How to convert multiple jpg files to one one pdf file by one click . I have got 2 solutions that I consider solve this situation to the best ....
*1.* Install SCRIBUS from synaptic package manager . It can convert jpegs to pdf without any issues . F Spot Photo Manager can also be used .
*2.* This 2nd step I find much better .... I have been using it myself for some time now ... and its flaw less ...
A) Install WINE using the terminal . For beginers .... Its a software that can run selected windows applications on a linux destro like ubuntu. Installing is very easy >>>> open synaptic manager and in quick search box type Wine. Once the wine files show in the search mark them for installation. For details on easy manual for wine installation check here .. [URL]
B) Now go to the page below .... Its a free software.
[URL]
Down load and save the software from the link given . Open the file using wine ( Right click on the file and choose the option open with wine.) The installer will run and the programme will be installed . And Viola ... Its ready .... Import ur jpg files and merge them all in to 1 pdf file .. Very Useful In Merging Comics together.
I installed Redhat Enterprise linux server5. it has two LAN card and two subnet connected to these two LAN card. i can browse network from these two network easily. But i created VLAN on one network card.Now i cant browse network from these VLAN subnet.
I want to extract some information from ifconfig, E.g.: inet addr:123.123.123.123 Bcast:123.123.123.255 Mask:255.255.254.0 I want to extract the mask value, how can I do that? I've tried using Code: grep -o "Mask:*" test1.txt but it only outputs "Mask:" I need to get 255.255.254.0
I am trying to figure out how to mask local timer interrupts on a specific core of a multicore system from within user space. The interrupts are causing latency spikes of 3-10u that we would like to remove. We are only running 1 thread on the core h everything shielded except for these timer interrupts. This thread makes no system calls and thus is never getting context switched out. I am not looking to turn them off entirely but rather turn them off, run my code, turn them on in a continuous loop. The thread runs in user space which we are hoping to maintain. We also have no desire to modify the kernel if possible. I've read about using spinlock_irqsave() but it appears (not positive) that it must be used within kernel space.
I have converted a couple of Video Files into OGM using DVD Encoder ( OGM), is there any available software in Linux/ Ubuntu that will enable me to convert these to be able to play on a Standard DVD Player. ( AVI - Mpeg )
I have just received my iphone 4 16gb, I had already looked into a work around for the whole itunes inside linux issue and instead opted for gtkpod ipod manager which works a treat for my music however I have no way of converting and putting movies on my phone.
Previously I would have used Handbrake to do my video conversions however the new version download on their site doesnt work with 10.10 for some reason and both handbrake and gtk gui are missing when I look in the ubuntu software updates.
Quote:As the line between securely hosted and controlled enterprise applications and cloud-based applications continues to blur, there's more "legitimate" traffic between corporate networks and the Internet than ever before. This opens up new vectors for attack by hackers nd cybercriminals as more traffic types are allowed through corporate firewalls. The result is an increase in diversity of covert command and control channels, which hide inside legitimate traffic in order to bypass perimeter security. These C&C channels, used by malware ranging from simple spambots to more sophisticated rootkits, vary in the maliciousness of their intent from casual hacking all the way to advanced persistent threats (APT) and industrial espionage.
While I was setting up CentOS 5.5 for my first time I faced this problem which is connecting to a printer is not possible, my tutor told me you need to change from eth0 to eht1 or eth2, what does that mean? And if I do this, how can I connect a printer which I have its name and IP address.
Computer A has two network interfaces. One is on a 255.255.255.240(eth0) subnet and has an IP of 192.168.1.6 and the other is on 255.255.255.0(eth1) subnet and has an IP of 192.168.1.64. eth1 can communicate with modem(192.168.1.254), which also acts as a gateway to the Internet. eth0 can communicate with my internal LAN, which consists of several computers including Computer B. This subnet 255.255.255.240 has it's own gateway to the internet at 192.168.1.1. However gateways will not apply to this scenario. I just added them to help paint a picture of my network.
What I am trying to do is tunnel http from a web server running on the modem(192.168.1.254) across to Computer B within my internal LAN and be able to view the http content via a browser. Sure I can just open a browser on Computer A, but I'm running Computer A headless. I can also curl it from a command line, but I'd like to learn how to tunnel across a subnet. If I get this to work, would I be able to interact with the site(i.e. make modem configuration changes)? or would it just be one way? How do I tunnel data from the eth1 subnet over to the eth0 subnet and over to Computer B on my internal LAN?
What I tried was the following: I setup a proxymini to run on Computer A and have it listening on the eth0 interface on port 8080 by using this command 'proxymini -l 192.168.1.6 -p 8080'. Then on computer B, I setup httptunnel -a 80 -p 192.168.1.254:80 -d 192.168.1.64:8080. Then I should be able to view the site through a browser on port 80 on the computer I run httptunnel? This setup isn't working.
Two servers, one is RHEL 4, and the other is RHEL 5. They are both on the same subnet, one is 10 the other is 11. I added the Webmin rule to the iptables config file but for some reason, the RHEL 4 server, I can access Webmin but the RHEL 5 server I can not. I checked the iptables file and they are the same for both servers, except two rules which are for other ports.
I'm reading about the iptables and had a problem when I manually added the port 10000 entry after the REJECT entry, but wondering if I need to move it up higher or maybe there's another possible block?
A good video converter software for openSUSE to covert videos into multiple formats.it will be easy if it ask me to covert videos for a specific device like i-pod,Nokia,Samsung mobiles.
I just installed a OpenSuse 11.4 box. Now when I do a 'ls -l' I see the date format different than on all my other boxes even though I have identical regional settings. Is there a way (env var) to control this behaviour ?
How can I add this to Ubuntu so that I can effectively use both networks connected to my machine. All I do in WinXP is run this from the command prompt: route -p add 10.0.0.0 mask 255.0.0.0 10.15.122.9
I have a linux desktop with two connections - fast eth0 and slow modem ppp0. Most of traffic (e-mail, DNS, NTP) can be routed simply by IP/mask. But how about http and p2p (torrents, DC++)? Routing by IP is unacceptable, because there is very huge amount of routing rules. I need route http packets (80 port) through ppp0, p2p through eth0 (10000:65535 ports). I've found that splitting traffic by port is possible with marking packets for different gateways. For begin I cleared all tables and bringed up connections.
I've blown a couple of DVDs trying to burn them with correct file masks (directories and files are read-only). There doesn't seem to be any documentation for K3b (building the index doesn't do squat and the help says "The file or folder help:/k3b/index.html does not exist"). I can't seem to figure out a setting that simply copies everything the "way it is."
I have a setup samba and want to get the correct security permissions when my wife creates / copies files from her camera onto the shared/mapped drive on her new laptop (windows 7) I want the permissions set to 770 or maybe 760. See my config below.
Now I can get it to create 760 but even if I change the mask it still generates the same permissions. After every change I restart the samba service. the umask is still 0022, do not know if that makes a difference? The directory permission's are correct with this mask. Do I need to look at groups?