When one connects to an SSH server running on a non-standard port ( i.e. not port 22) it is straightforward to alter the command syntax so you can connect to this port. Is it possible to define the source port from the local machine ? For example, can you define the source port on your local machine to be 12345 as opposed to another port chosen by your system?
I'm trying to modify my Linux server's Samba config so that each user gets their own private folder, in a similar way to having a private 'home' folder. Is it possible to create a samba share that maps to different places, depending on username? E.g if 'bob' connects they see the contents of /documents/bob and if 'fred' connects they see the contents of /documents/fred, and so on?
(I know this is what the [homes] share does, but I want another specifically for each user's private documents that won't get mixed with all the Linux user cruft such as dotfiles and things)
I just installed an ubuntu netbook edition on my notebook. In the installation process I defined a user with a password. I can use that password to access many system tools, like the synaptic package manager, adding users and so on..
However, when I wanted to do some staff in a terminal as a superuser (using the su command), and I enter my password (There is only a single user and a single password so far) I get authentification failure.
I went to System-->Administration-->uers and groups . I changed the my account type to an "Administrator" (for that I used again my password). hoping that I can use the su command but still it did not work..
I feel that the superuser needs to be set or defined. Since I have not done that then whatever pass word I enter after the command su I will always get "authentification failure"
How can I define the superuser and tell the system that I am the superuser of this computer?
I'm looking forward to know how to connect to a remote server through SSH but from a specific port, so I con drop connections from random ports that's not the one I choose. Is this possible?
I have tried by setting up an iptables entry to forward output through both, PREROUTING and OUTPUT (one at each time, flushing when I can see that it's not working), in NAT table, so I can connect doing ssh localhost
I want to do this because I think that doing this will enhace the security, dropping connections of clients that are trying to connect from not allowed ports. I have already set up fail2ban and created SSH keys, not allowing to login with password, only key allowed. Will only allowing connections from a specific port will enhance the security or not really?
My network isPC1 -- (NIC1,10.1.1.x) Linux (NIC2,10.1.2.x) -- Server 1 (HTTP/FTP)My question isIn the linux system, can I change the PC1 source port from 20000 to 30000? for examplePC1(sport:20000,dport:80)---Linux-- (sport:30000,dport:80)--- Server 1 (HTTP/FTP)
I've a server, and I want to drop all the traffic going out with other source port than 80 (apache) and 22(ssh). The reason is I want to prevent my machine sending packets I don't know (i.e. my server scanning networks or making DDOS attacks without my knowledge). The problem are the updates. If I do what I've said, the updates will not work. I want to allow updates, so I need to let DNS traffic (port 53) and the traffic of the updates to go out.
The problem is the source port. This traffic uses a dynamic port (I think like HTTP). Is there any way to specify a source port to do this? If a have a static port to do this, I would drop all the traffic going out with other port than 22,53,80 and this port.
I am trying to generate a UDP syslog packet from my C application. But I am facing a problem with a Cisco Router ACE that does not like the Source Port being '0' and thus drops the packet.How can I specify the Source Port in the UDP header to '514' as stated in RFC3164 (Section 2: Transport Layer Protocol)? "It is RECOMMENDED that the source port also be 514 to indicate that the message is from the syslog process of the sender"
I've searched through the forums and found a few threads that kind of helped, but I'm still pretty lost when it comes to TC. I'm trying to do and also break it down and explain what each part of the command does so that I can learn along the way. What I'm trying to do is limit any connection from source port 6001 to 30KB/s.
I'm currently running a game server and it has no built in bandwidth limiting feature, which means if someone logs in and needs to download the map it destroys my bandwidth for the rest of the servers players. The game server is running on port 6001.
I am currently having an issue attempting to set up a dedicated server for source games (TF2, CS:S, L4D2). The required port (27015), along with most others, appears closed to the rest of the world and upon a port scan with DMZ hosting on (therefore no router interference between the internet and my computer) only a few ports are open (80, 139, 443, 445). My ISP does not block ports so therefore the only issue I can find is with my computer running Ubuntu 11.04. I have ensured that all traffic is allowed via iptables and I can't think of anything else that would have ports closed.
I'm simply trying to make a little restriction on www packets under two rules:
1. Allow inbound/outbound www packets (works!)
2. DROP inbound traffic to port 80 from source ports less than 1024. (DOES NOT WORK!)
Now, technically, when i use hping to test my rules, hping3 192.168.100.100 -S -p80 -s 1023 I should NOT receive any packets. However, i still receive packets, which means my rule that says less than 1024 does not work. (see below)
And this is my iptables rules in shell-script so far:
VERY new to linux, erm but I have an issue that needs solving!I recently moved to university, where their network blocks sftp port 22, this means that I cannot connect to my FTP server which is running a version of linux.Now I've got this ftp server connected to a seedbox and it was created using the following walk through..Code:I have written this guide for a friend, but I though it would be useful for others as well.
There are several guides floating around, but I found that most always cock up in some way. This one is tried and tested to work on Debian Etch (on an OVH rps, but should apply to most servers).If there is a new stable release of rtorrent/libtorrent then I will update this guide to show you how to update it (without reinstalling the whole server).
At the bottom there are also instructions to install ftp access & some network monitoring software.Basically, I would really like someone to be able to construct the commands on how to change the listen port for sftp connection on linux or add another port to the list that Linux would use so that I could put in through putty.
I need to replace JAVA_OPTS= with JAVA_OPTS=<some_value>.I need to give "" value at the end of the replacement. I have tried with the following but it is not working: sed -e "s|JAVA_OPTS= |JAVA_OPTS=<some_value>"
I have a server with 192.1.9.10 ip address and I want to define two gateways with ip: 192.1.9.4 and 192.1.9.254 on it but I don't know how I can do it. I don't have professional information in linux.
I am trying to use bash 'printf' to format an environment variable.Doing this I get on the screen just the format I need (underscores mean blank spaces):prompt> printf "%10s" "1.23"________1.23Unfortunately, when this is assigned to a variable, the format disappears:prompt> X=`printf "%10s" "1.23"`prompt> echo $X1.23Does anyone know what can be done in this case to get a proper format?Why does not 'printf' respect the left blank spaces when assigning values to a variable?
I am trying to make a periodic boundary condition type function, using an existing class given to me in lecture notes, but am having some trouble! Effectively, I am trying to make an array such that, for a point in any row of a 2D matrix ("Matrix(i,j)"), the command "next_i[i]" will return "(i+1)%L", where L is the number of data points in the row. This will enable me to select a point to the right of any point in the matrix: "Matrix(next[i],j)"
I want to do a simple port redirect, i.e. whatever comes trough whatever interface on port AAAA will get redirected to port BBBBI thought that iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport AAAA -j REDIRECT --to-ports BBBBhowever it doesn't work, e.g. nc -v -w2 -z localhost AAAA gives:
nc: connect to localhost port AAAA (tcp) failed: Connection refused while nc -v -w2 -z localhost BBBB
I'd like to know if there is a way to define commands in the .bashrc or .bash_profile. For instance, I want to be able to type 'work' in a terminal and set up an interactive work environment on my universities cluster. (This is done with the command 'qsub -I -X'.) I tried the following in my .bashrc file:
alias work ='qsub -I -X'
But, of course this failed, as I don't have a command work already defined. How do I go about doing this? Also, I can't assign 'qsub' an alias, since it's used with different options quite extensively.
I'll come out and say I actually quite like unity, but it still needs a whole load of development. So I'm just wondering if anyone else knows how or why you can't bind Compiz keyboard shortcuts wile running unity. I'm trying to bind a shortcut (any) to Initiate a Window Picker for Window Group. If Unity is moving toward the Mac way of treating groups of windows that belong to the same program as an application it needs to have more options to manage those windows, being able to at least expose those windows would be a start. However I cant seem to put a keyboard binding for this function. I've tried <super>+<shift>+W and on a hunch that it was unity's Super that was messing it up <control>+<alt>+ and <super>+ and <alt>+W and <alt>+<shift>+W.
I have two identical webcams and I want to assign video0 and video1 to a particular one. I understand I can do this using udev but a bit stuck as being both the same they have the same attributes.
I use Persian language on my system and I really need two things:1. To define a custom layout for my keyboard. I am used to a layout that is not available in Ubuntu. Can I do that? (For example I need the system to enter a ****Ůž character instead of when I hit the backslash key)2. Defining a custom hotkey. I used a hotkey program in windows so I could enter no-space breaks with shift+space. Can I define that in Ubuntu
We are using Red Hat Enterprise AS 3.0. There are 100+ users connected to a single server. As the Inbox size of Mail Client (Thunderbird) for each user grows there are space constraint on the server. So I want to define a quota on mail folder for each user (say around 500 MB to 1 GB). How can I do this.
I recently upgraded from 11.3 to 11.4 succesfully. I had to reinstall several applications and, some of them, can't be configured as default from the control panel (e.g. Opera as default browser, VLC as default media player). The problem is that droplists at the prefered applications don't show any other than the default ones, Firefox and TotemIs there a way I can change these settings via command line or a way to fix what applications are shown at the control panel?
I have a Radeon HD 5830, running 3 monitors on 10.10 64bit with the 10.6 video driver. The three monitors ( from left to right ) :
DFP1 : 1152x2048 DFP2 : 1920x1200 CRT1 : 1360x768
The problem I'm having is getting the middle monitor to be the primary one.
Running xrandr --output DFP2 --primary
puts the panel on the middle screen but my docky and icons stay on the left screen. Flash videos also open up on the portrait left monitor which looks awful. Ideally I would like the icons on DFP1, docky on P2 and flash videos to open on P2. But I would definitely settle for everyone to be on the middle screen and drag it around as I please.
I am trying to install Ubuntu 10.04 into an existing partition. The other partition contains some backups.
When I get to step 5, the system freezes on the message that no root file system is defined. Correct this from the partitioning menu.
I have tried the options, but except for allowing the installation to take over the whole disc, erasing my backups, there does not seem to be an alternative way forward.
The following partitions are shown: sda1 (fat16) 33,7 MB sda6 (fat16) 26,2 GB sda5 (ntfs) 53,8 GB
My backups are on sda5 and I am trying to install Ubuntu on sda6.
I have a problem defining persistent device naming on a Debian Lenny server.I have:RAID1 controller on the server machine with two SCSI disks.external storage with RAID5. I have / mount on the first partition on the server SCSI disk and /storage mount on the external storage. I'm experiencing a problem: The system recognizes the system disk (RAID 1), as sda or sdb randomly.I want: To control the recognition, and tell the system that sda (sda1) will always be the system disk.The motivation: GRUB is configured to work with sda, and when the system disk doesn't, boot process fails, and I end up in the initramfs shell-like interface.
Code:
Booting the kernel . . . mount:mounting /dev on /root/dev failed: No such file or directory mount:mounting /sys on /root/sys failed: No such file or directory
I am trying to modify a script for research purposes and am having difficulty here as I have little prior experience with C-shell scripting.
The script looks as follows (it includes tcl commands like runFEP that you can ignore)
#!/bin/bash
for ((old=1, new=2; old<=4; old++,new++)) a1=${old}%50 a2=${new}%50 do cat > input${new}.conf <<EOF ${a1} code....
My question: I keep getting a syntax error when defining my two variables a1 and a2. I essentially need these variables to be a1 = value of variable old divided by 50 a2 = value of variable new divided by 50