Ubuntu Networking :: Server Is Not Passing The Right IP Addres?

Mar 29, 2011

I am having an issue with pureftpd and the way it handles passive mode. Here is a link to a discussion on filezilla.

[URL]

Basically the problem I have is that the Ubuntu Server is not passing the right IP address. It passes the internal "unrecognized IP address"

How do I set up Ubuntu to know it external IP address and pas it during a passive mode FTP connection?

View 1 Replies


ADVERTISEMENT

Programming :: Passing A Source Ip To The Server?

Jan 12, 2011

i'm programming a small tcp client, but i need that the server knows the source ip. My client receives a external connection and forwards, but the ip seen by the server, of course, is the client ip. I would like, change this ip to original source ip.

I don't know how to do this. I tried with the connect and select function.

View 5 Replies View Related

Ubuntu :: Apache2 Mod_Rewrite - Passing The Artist=$1 To The Server GET Vars

Sep 9, 2010

I've given a bit of support using Mod_rewrite to use magical urls to redirect to scripts, but when I migrated to Ubuntu's Apache2... I'm lost. I basically want to rewrite like this:

Code: RewriteRule ^artist/(.+)/$ artist.php?artname=$1 But I noticed that it wasn't passing the artist=$1 to the server GET vars. Then I noticed that if I changed the name of the file in both the rule and the file system to artists.php, typing artist/blah/ no longer was found. So then I realized that if I removed the rewrite rule artist/hello/ would still resolve to artist.php without any parameters my htaccess is like so:

[Code]...

View 1 Replies View Related

Server :: Passing Piped Emails On To Qmail Again?

Aug 3, 2010

I am doing this project for our school. Basically we want to pipe all incoming emails to a script which filters out certain messages (not only spam but duplicates, large messages, etc). If they fail certain criteria, the script simply does nothing.If they pass , then the script should pass the entire message (headers and body) back on to qmail to send. The piping part is not a problem, but I am stuck with the next part. Is there a way to pass the headers and body back to qmail for it to process and send, as if it received it the first time?Some details:A catchall email account is created via Plesk control panel on linux (centos).THe .qmail file in /var/qmail/mailnames/domain.com/catchall/ is edited to include the line:-|/path/to/pipe/handler.phpThe handler.php file simply reads the entire message (headers and body) and they are then parsed and analysed.

View 2 Replies View Related

CentOS 5 Server :: Freeradius Not Passing Authentication To AD?

Oct 15, 2010

I'm running freeradius2-2.1.7-7.el5, on CentOS 5.5. I have gotten all of the authentication setup for active directory and I know that the machine is able to pass requests along to our AD server. However it doesn't appear that freeradius is doing the same. I have been looking at the attached radius -x output for about 2 days now and I have done a ton of searching and have come up relatively empty handed.

View 3 Replies View Related

Ubuntu Networking :: Message Passing Over The Network?

Jun 25, 2010

We have a ubuntu machine on the network with number of users in it. Basically, when other users connect via telnet i want then to get particular messages depending on the user. The message will be set by the administrator or a particular user with privs. Similarly we also need a to-do app via which users can update their work and see each others progress . Its all in a local network. Do tell what would be the best way to do it!

View 2 Replies View Related

Ubuntu Networking :: Router Not Passing On DNS Address?

Feb 2, 2011

I'm using an ubuntu machine to route internet to my main PC. I think I finally got it working with DHCP and all, but there's still a slight problem. DNS does not work! My /etc/dhcp3/dhcpd.conf file contains the following lines:

Code:
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;

[Code].....

I am currently only able to post on this forum because I copied /etc/resolv.conf from my server to my main machine. Now DNS is working. But it should update automatically, right? Currently, this isn't working.

If possible, I'd like it most if I wouldn't have to hardcode the DNS servers in /etc/dhcp3/dhcpd.conf either, but that the server would just relay the DNS adress it has gotten itself!

View 7 Replies View Related

Server :: Passing On Command Line Switches To Other Programs?

Nov 10, 2010

On our server we have a certain directory, say /storage, that contains many large files. They are all compressed (gzip). Many of our users are not computer-savvy, and so when one of these files is needed, they will copy it to their own directory. Consequently, we have multiple terabytes of duplicate data. I'd like to enforce an alias whereby if someone tries to use cp on a file from /storage, they will instead create a symbolic link. My idea was something like:

alias cp='cp.storage'
File cp.storage:#!/bin/sh
truePath=$(readlink -f "$1")

[code]....

The conditional checks whether the file being copied begins with "/storage". The problem with this is that if someone wanted to use cp with any options on a file not in /storage, those options would be obliterated. Can someone guide me as to a good way to accomplish this? Either a way to get the options from cp into cp.storage, or another approach not using alias this way. Everyone will be using bash.

View 2 Replies View Related

Ubuntu Networking :: X11vnc Not Passing Upper Case Characters?

Apr 1, 2011

Using 10.04 and x11vnc I'm finding that upper case characters are being sent as lower case. I've tried multiple keyboard configurations with no success

View 1 Replies View Related

Networking :: Traffic Not Passing Through Iptables / Resolve This?

Jan 23, 2011

I did some playing around changing up the configuration of my server and now cannot pass traffic through to port 22. I have since restored everything back to the way it was but am still not able to ssh into the server.

nmap only shows port 80 and 5222 open. Both ports that I want open. However I am unable to get 22 to pass.

iptables -nL shows
http://www.theprepared.com/images/tech/iptables_nL.PNG

netstat -an |grep 22 shows
http://www.theprepared.com/images/tech/netstat.PNG

I've tried clearing the routing table with the following which did no good.
ip route flush table main

Can somone point me in the right direction?

View 1 Replies View Related

Server :: Shell Scripting Command Line / Getting Error While Passing Parameter?

May 6, 2011

I am very new to shell scripting.How does one pass a command-line parameter to a shell script?for the below program
#/bin/bash
mount -t cifs -o user=ramkannan,password=Linux123@ //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql

I want to pass parameter for everything,i tried in google and did but iam getting error while passing parameter to all

#/bin/bash
mount -t cifs -o user=$1,password=$2 //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql

i was getting error while passing parameter to all.

View 2 Replies View Related

Ubuntu :: Passing A Cookie To Firefox?

Aug 3, 2010

i would like to know whether it is possible to pass firefox a single cookie generated by some other program (in this case wget), doing it from the command line. my concrete use for this is to login to a site (connect.garmin.com) with wget, saving the cookie with --save-cookies --keep-session-cookies, pass this cookie to curl, do some uploads and then pass the cookie to firefox to open the page and have me logged in automatically (everything besides firefox is sorted out). google searches and the firefox man page suggest that firefox doesn't have this functionallity, but would it in that case be possible to link the cookie into firefox's normal cookie jar?

View 1 Replies View Related

Ubuntu Servers :: Proxy While Passing Through Another URL?

Nov 20, 2010

I'm trying to set up a hot spot using a squid proxy server for network logging of accessed website URLs. I really would like to pass all web traffic through a custom PHP program.Like when a computer tries to access www.google.com it first goes through the proxy server, and then the proxy server sends back a URL like URL...which is then accessed by the end-user's computer.. I'd eventually set up the php program to redirect the user to the requested URL after my application executes.Is this at all possible to do, with or without squid?

View 2 Replies View Related

Ubuntu :: Passing Arguments In Commandline

Mar 13, 2011

I have some source code of an application called gmapping.

I am pasting the source code documentation below:

SCANMATCHER:

How do I run this file. When I enter the filename parameter, and press enter, I get

COMMAND LINE: parameter aces not recognized no filename specified

GridFastSlam: Initialization Error!

(Did you specified an input file for reading?)

What is the right line to type in the terminal to sun this code?

View 1 Replies View Related

Ubuntu :: Passing Enter To Shell Script

Apr 26, 2011

I want to write a script that runs ssh-keygen command and when it prompts for input, the ENTER key code is passed automatically for all questions.

For example consider this:

Code:

I want to automatically pass ENTER to the questions. What should I do?

View 6 Replies View Related

Ubuntu :: Incrontab Not Passing Arguments To Bash Script

Feb 28, 2010

It seems incrontab wont see spaces properly at all. I setup a script to echo the arguments passed to it by incrontab to a file, and no matter what I put around the arguments on the incrontab file it will count a space as the next argument.

I have written a script to automatically retrieve imdb artwork for a given filename. Here is the script:

Code:

You can ignore all the commented "echo" commands that was just me testing. Anyway, the script work fine, however I am trying to use incrontab to monitor a folder, when a new (video) file is moved into the folder, it should execute the script and retrieve the artwork. My problem is, when incrontab passes the $# argument to my script, the script wont work because the spaces aren't escaped.

Here is some more detail:

Incrontab

Code:

Code:

The problem is, the script GetArtwork, doesn't see "Bangcock Dangerous" it just sees "Bangcock"

I have tried putting quotes around the $# in the incrontab - this just makes the script see "Bangcock (notice the single quote character)

View 2 Replies View Related

Ubuntu :: Passing Commands To A Subshell In Bash Scripts?

Sep 24, 2010

I was reviewing some scripts written by a person that does not work with us anymore and I found a chunk of code I'd like to know more about.

Code:
mycli <<! >> /var/myprogram.log
command_1

[code]...

View 2 Replies View Related

General :: Passing One Variable To Another

Jan 8, 2011

I am new to bash scripting. I want to know whether i can pass one variable to another. For example $1 represent argument1. Now if i want to get the argument 1 like USER="1" now i want $ of $USER to execute $1 so what should i do..

View 2 Replies View Related

Programming :: Passing Class To Itself (CPP)?

May 18, 2010

I'm struggling with the issue of passing a vector of a class to itself, here's what state its in now... (tried many variations, but without direction).

Code:
#include <iostream>
#include <string>

[code]...

View 2 Replies View Related

Programming :: Passing Data Between Php And C

Aug 21, 2010

I'm trying to work out the best way to achieve the following.

1)php page that grabs data from a local database. (not a problem)

2)It then needs to send this data to a c program/service running on a remote server. (I probably need it to be able to handle 4+ million reocrds in an array)

3) The c service then needs to process the data and send it back to the initial php script that called it. i was hoping this could be in a an array like structure of some kind. 4)update the db with the results.

I was thinking of using gsoap to write a simple c soap service that php can communicate with. Would this be the right way of doing this or would something like sockets in php be a better way of sending this volume of data as an array or struct to linux c socket if thats even possible.

View 3 Replies View Related

General :: Passing PATH Through Sudo?

Jan 21, 2010

In short: how to make sudo not to flush PATH everytime?

I have some websites deployed on my server (Debian testing) written with Ruby on Rails. I use Mongrel+Nginx to host them, but there is one problem that comes when I need to restart Mongrel (e.g. after making some changes).

All sites are checked in VCS (git, but it is not important) and have owner and group set to my user, whereas Mongrel runs under the, huh, mongrel user that is severely restricted in it's rights. So Mongrel must be started under root (it can automatically change UID) or mongrel.

To manage mongrel I use mongrel_cluster gem because it allows starting or stopping any amount of Mongrel servers with just one command. But it needs the directory /var/lib/gems/1.8/bin to be in PATH: this is not enough to start it with absolute path.

Modifying PATH in root .bashrc changed nothing, tweaking sudo's env_reset and env_keep didn't either.

So the question: how to add a directory to PATH or keep user's PATH in sudo?

Update: some examples

$ env | grep PATH
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/var/lib/gems/1.8/bin
$ sudo cat /etc/sudoers | egrep -v '^$|^#'
Defaults env_keep = "PATH"

[Code]....

View 4 Replies View Related

Red Hat / Fedora :: Passing Xml In Mem Or Variable To Xmllint?

Jul 24, 2010

How can I pass xml data from memory or a variable to xmllint that expects a file as input? Or does xmllint have the capabilities to read from stin or a variable?

View 4 Replies View Related

General :: Passing Program Arguments To Gdb?

Nov 18, 2009

I'm using gdb to debug my program. My program requires arguments (e.g., ./prog -dfile).But if I use gdb as in gdb ./prog -dfile, gdb wants to interpret the -d argument. How do I pass an argument to my program via gdb?

View 2 Replies View Related

General :: Passing A Structure In A Socket?

Mar 31, 2011

So I'm trying to teach myself to write programs for unix in c. I am currently creating a program, and I need to pass a struct through a socket

The struct I want to pass has two types in it, one enum and one union of two other structs. These two other structs each contain an int and a char variablename[256] array.

gcc won't let me just pass the struct using write(pipefd[1], struct, size_of_struct) since the struct is not a char buffer. So that's my question...how does one go about passing a struct?

View 1 Replies View Related

General :: Passing Parameters To Script ?

Mar 13, 2010

I have the following bash script:

Code:

Which has the name 'extractemails.sh' and works just fine.

However, i whish to be able to give the url (or any other url) as a parameter when i run the script like this: $ extractemails.sh [url]

What should i change in my code? i have never tried passing parameters to scripts before.

View 4 Replies View Related

Programming :: Bash - Passing Variable To Ssh?

May 8, 2010

I have a file with around 1000 IP addresses in it and I need to be able to ssh into each one of them, run a single command, and then exit. I already know the ssh command I want to run and it looks like this:

Code:

shpass -p [password] ssh -p 10022 -o StrictHostKeyChecking=no root@[ip variable] 'reboot'

(I know shpass is not good to use and keys are the correct way but I don't have any other options in this scenario.) if these ip addresses were in a .csv file, by themselves with no other information, how would I create a script to do the above command to each ip until the end of the file?

View 8 Replies View Related

Programming :: Parameter Passing In The HTML?

Jun 11, 2010

If I have the following links in HTML

Code:

<a href=lang.php?lang=cymraeg>Cymraeg</a>
<a href=lang.php?lang=english>English</a>

and lang.php has a link to page2.html, how do I pass on the value of the lang parameter from lang.php to page2.html? The value needed is the one passed in to lang.php.

View 3 Replies View Related

Programming :: Passing A Char* By Reference In C++?

Apr 26, 2010

Below I've presented the declaration, definition and the calling method of a function w.r.t pass by reference:

Declaration

Code:

void getUnpackedMsg (unsigned char &data, unsigned int numberOfBits);
Definition
line 278: Shown in RED

Code:

void packedMessage :: getUnpackedMsg (unsigned char &emptyArray, unsigned int numberOfBits)
{
...
...
printf ("

[code].....

View 3 Replies View Related

Programming :: Passing A Variable To Bc In Bash ?

Jan 14, 2009

I cannot for the life of me get this little (simple) script I wrote to work. Here is the entire script:

Code:

#!/bin/bash
ASPECT=`mediainfo $1 |grep "Display aspect ratio" |cut -d : -f 2`
HEIGHT=`echo "320 / $ASPECT" |bc`
SIZE=`echo 320x$HEIGHT`

[code]......

An input filename ($1) is fed into mediainfo, which by the use of grep and cut spits out a single number which is the aspect ratio. This is then divided by bc into 320, which gives the desired height dimension for the file that I want ffmpeg to create for me. Finally, ffmpeg runs using the calculated dimensions... Basically, it's the passing of the $ASPECT variable to bc that seems to fail. It looks like bc won't read the output from the mediainfo line... It always crashes out with:

Code:

(standard_in) 1: illegal character: ^M I've tried doing something even simpler like this to debug by just trying it to display the calculation on the screen:

Code:

#!/bin/bash
ASPECT=`mediainfo $1 |grep "Display aspect ratio" |cut -d : -f 2`
HEIGHT=`echo "320 / $ASPECT" |bc`
echo $HEIGHT

and it does the same, so it's definitely bc that won't accept the output from mediainfo.

View 4 Replies View Related

Programming :: Passing Variables By Reference?

Mar 19, 2010

I was trying to make a code for passing variables by reference..here's the code:

#include<iostream>
using namespace std;
void fun(int& ,int& );
int main(){

[Code].....

invalid initialization of non-const reference of type 'int&' from a temporary of type 'int*'

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved