New answers tagged networking
3
Some years ago I had a similar problem of automating remote connections.
I used expect which is a very flexible tool, but sometimes a bit subtle to use. It will do anything a user can do by typing at the command line, but all possible reactions of the system(s) must be recognizable by the expect script
(hence the name of the tool: it does not like the ...
3
The main thing you need to automate is the typing of the ssh password. There are two ways I know of that you can try, either set up password-less ssh or install sshpass:
Use sshpass to enter the password. If you have the DAG repositories set up, you should be able to install with yum:
yum install sshpass
If not, you can either download the RPM directly ...
1
2 RPMs
The files are remnants of 2 RPM packages. If you run the following command you can see which RPMs are responsible for these directories:
# centos 6.4
$ for i in /etc/sysconfig/networking /etc/sysconfig/network-scripts; do echo "==> $i"; rpm -qf $i;done
==> /etc/sysconfig/networking
system-config-network-tui-1.6.0.el6.2-1.el6.noarch
...
1
Before NetworkManager was a thing, Red Hat had (I'm guessing still has from your output, I have the directories but no files in them on the two servers I checked) a sysconfig-* tool you could use to specify which networking profile to use, after which you just restart the network service and the other settings take effect.
Last one in the find output is ...
1
I would strongly encourage you to use OpenBSD. The task you are inquiring about is done by ALTQ (ALTernate Queueing framework) which was originally ported from FreeBSD and integrated into PF. The good news is that OpenBSD is about to get its own Queueing framework (it is in testing phase). I would discourage you from using pfSense. pfSense a FreeBSD based ...
3
Routing is about "where (and if) to send to". That's not limited to selecting a NIC. In your case routing is very simple though.
You need masquerading in its most simple form (all commands on host A):
iptables -t nat -I POSTROUTING -s 192.168.22.234 -j MASQUERADE
And maybe (if not yet) you need allow forwarding:
iptables -I FORWARD 1 -m conntrack ...
0
Installing Hackintosh is often easy as an OS X install (depends on hardware) and for a headless server, the most trouble some drivers aren't important anyways. (sound, graphics). There's no other option for using Home Sharing without iTunes.
1
I'd recommend pfSense. From the home page:
pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router. In addition to being a powerful, flexible firewalling and routing platform, it includes a long list of related features and a package system allowing further expandability without adding bloat and ...
1
Ok, after several tries I sorted this up:
rsync -vaiz --delete --exclude=.svn/ --include='*.php' --include='*.js' \
--include='*/' --exclude='*' --prune-empty-dirs \
--filter "protect .svn/" /origin /destination
Thank you
1
1st attempt (didn't work)
You need to include the directories in addition to the files:
rsync -zavC --delete --include '*/' --include='*.php' --include='*.js' \
--exclude="*" /media/datacod/Test/ /home/lucas/Desktop/rsync/
2nd attempt
rsync -avzC --filter='-rs_*/.svn*' --include="*/" --include='*.js' \
--include='*.php' --exclude="*" --delete ...
0
This is a know bug in Ubuntu 13.04 kernels...
See Ethernet connection not stable on Ubuntu 13.04(bug exists in 32bit and 64bit version) (kernel-bug-exists-upstream).
0
OK then I understand what you're asking for now. You have control over a DHCP router/switch which is also responsible for DNS name resolving.
Take a look in the dhclient.conf man page. Specifically you'll need to add some additional lines to your /etc/dhcp/dhclient.conf file.
For starters you'll need to add this line:
send host-name 'your-hostname-here';
...
3
Interfaces are usually named via udev. You can find the detailed rules for this in a file like:
/etc/udev/rules.d/70-persistent-net.rules
If udev finds a "known" interface it uses the name configured there. If udev finds a new interface it will give it a new name and add a corresponding rule there.
You can change that file and give you interfaces a ...
0
You can change the hostname by editing the /etc/hostname file and you need to update the kernel parameter "kernel.hostname" to make it effective at instant
hostname command is an one more option
check here : http://linuxinternetworks.com/how-to-change-hostname-in-linux/
0
/etc/host and /etc/hostname should contain the hostname, but not the FQDN.
But you do have the hostname tool that will let you view and set the hostname.
man hostname should give you more information.
Alternatively, the man pages online are available as well.
As you are not able to see the hostname on the network, there are a few options to have this ...
0
You must use hostname command to edit your hostname.
hostname <newname>
4
You can see if the server accepts a connection on the port by running telnet HOSTNAME PORT or nc HOSTNAME PORT. If the server is listening, the connection will be established, you'll see the banner sent by the server if any, and you'll be able to type commands. If the server isn't listening or if a firewall is blocking the way, nc or telnet will not be able ...
1
telnet and netcat are our friends. With netcat having the advantage that it works with UDP, too.
2
Here's an idea using Perl to execute the script for you. You could translate this to your language of choice, or probably even bash. It's really the commands to connect to the wireless that count. Perl is just a means for me to do this quickly, your idea of quick may be different. A note if you're not used to reading Perl everything backticks is a shell ...
2
can you ping 8.8.8.8, or 8.8.4.4?
those are the ip addresses of Google's public DNS servers.
The unknown host error you post indicates at least a host name resolution error, not necessarily a network error.
Then, check /etc/resolv.conf and see if your dns servers are there.
If the entries are there:
check your default route.
If the entries are ...
1
Please see this post on SF about the same issue. It boils down to an issue of netmasks on the clients.
0
Looks like the usual separator for the multiple subnets is a comma, but at least openswan-2.6.32 works with spaces too.
Interesting information should be logged to /var/log/secure which could contain clues why it isn't working. Also post the output of ip x s sh and ip x p sh.
0
Redhat also uses client config file:
$ man dhclient
The DHCP client normally gets its configuration information from
/etc/dhclient.conf
That file by default is not created, so you can copy the following sample file and edit to suite you need. My client ver is 3.0.5, so the file path is:
/usr/share/doc/dhclient-3.0.5/dhclient.conf.sample
1
First of all, run ifconfig to get a list of all interfaces known to the kernel. In FreeBSD, interfaces are named after the driver module that controls them, so you might see em0, rl0, or any number of other things.
Once you know the name of the interface, you need a few settings in /etc/rc.conf. If you want to use dhcp, it's simple. (I will assume you have ...
1
Ok, so reading the comments in configuration files does work sometimes...
I was right supposing that net works as a "virtual dependency" in the sense that more than one service can actually provide it. And it is actually documented that way in the manual: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4. But in fact, this is ...
2
Use Socket Stat:
ss -p
You might want to explore ss manpage for some more options, like -r to resolve ip addresses to domain name:
ss -pr
Another good tool is netstat, but I found ss command line invocation to be simpler with respect to the result you want.
2
There are many tools and ways to do this but this is probably what you're looking for:
http://www.tcpdump.org/
2
On FreeBSD, you can also use sockstat in case lsof doesn't work for you (e.g. on virtualized systems that don't have /dev/mem for whatever reason). To get a list of all programs with listening IPv4 sockets:
sockstat -l4
0
You can make this a shell script for the first question:
#!/bin/bash
if ! /bin/ip route | grep -q ^default; then
echo "No Internet connection"
echo
exit 0
fi
if="$(/bin/ip route |
awk '$1 == "default" {for (i=2;i<=NF;i++) if ($i == "dev") { i++;print $i; exit}}')"
if [ -z "$if" -o \! -e /sys/class/net/"$if" ]; then
echo "Sorry, some error, ...
2
Just type in terminal 'iw' and then press Tab and you will see something like
iw
iw iwconfig iwevent iwgetid iwlist iwpriv iwspy
all those are related to wireless internet, try iwconfig to show statistic about signal and network interface.
2
Edit the ifcfg for this interface. For example, using wlan0.
/etc/sysconfig/network-scripts/ifcfg-wlan0
Verify that the ONBOOT selection is enabled.
ONBOOT="yes"
Configure services to run at boot
chkconfig messagebus off
chkconfig wpa_supplicant off
chkconfig NetworkManager off
chkconfig network on
Reference link
0
This looks like a network problem.
Enquire if some network equipment has changed or has been reconfigured. Tell your network administrator that you're having trouble ssh'ing in, there may be a misconfiguration in a firewall. Try logging in from other machines or to other machines to improve the diagnosis.
One possible cause of these symptoms is an IP ...
0
I had this problem show up with some servers at the main office and solved it using:
TCPKeepAlive yes
ServerAliveInterval 5
in the ssh config file ( ~/.ssh/config or /etc/ssh/ssh_config).
Only later did I found out that it was caused by some hardware installed to optimize the communication between the offices that interfered.
0
When you're running a bridge the members in the bridge (eth2) no longer should have an IP address assigned to them. br0 should be getting the IP now.
Example
This is output from a system that uses KVM. It uses qemu-kvm under the hood so it should be similar in setup to what you're trying to do.
$ ifconfig -a
br0 Link encap:Ethernet HWaddr ...
0
This could be due to packet loss. A tool like mtr could help you diagnose which one of the hosts in the route is causing problems. Here you'll find the instructions to install it on Mac OS X.
0
netstat is not a good source for this information. For one, the program may use certain ports only at certain points in time.
So the answer is -- ask the vendor of this program, or read the documentation (if not available, read the source.)
3
Call route get.
route get 192.0.2.42 | awk '$1 ~ /interface/ {print $2}'
2
Haven't used Fedora in a while, but it should still be very similar to CentOS. I did this on CentOS 6.
Copy /etc/sysconfig/network-scripts/ifcfg-lo to /etc/sysconfig/network-scripts/ifcfg-lo:1
Your new config should look like so:
DEVICE=lo:1
IPADDR=169.254.169.254
NETMASK=255.0.0.0
ONBOOT=yes
NAME=loopback1
Restart the network service service network ...
3
If you want to see if you can form a TCP connection from a remote machine, get OpenCSW installed on that and the target machine, and install netcat on both. This is the syntax for using netcat to test TCP connections:
nc -vz targetServer portNum
For example to check SSH on "homeServer1":
nc -vz homeserver1 22
That enables you to test TCP-level ...
2
Firewalls should reply with an ICMP message when they block a request. However, this is not necessarily the case (you will be interested in this nice article).
You can test from the outside to see whether a port is accessible through a firewall and, if so, whether anything is listening on it. Here's three different scenarios involving a tcp request which ...
0
You can use the command netstat to see if a port is open and listening.
Example
$ netstat -anp | less
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - ...
0
The configuration and the status of the firewall configuration is firewall/OS specific.
What you can do is try it from server2:
nmap server1
0
I'm not sure about *BSDs, but on Linuxes route -n tells you (apart from other things) flags (you'd probably want to search for the line which is marked as default route) and the device name:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.100.63.254 0.0.0.0 UG 0 ...
1
You can mark packets via iptables based on the UID of the creating process. You can use this Netfilter mark both for (advanced) routing (ip rule: man ip or man ip-rule; key word "fwmark") and for DNAT. I am not sure which one is easier / better.
Edit 1
For each user:
iptables -t mangle -A PREROUTING -m owner --uid-owner $user -j MARK --set-mark $usermark
# ...
0
netstat -tau shows you the local address and port used by a program. Each interface has its own address, except cases like bonding... Is that the information you need?
If that's so, it's easy to grep and cut the output to use it in a script.
For example:
netstat -taunpe | grep firefox | awk '{print $4}' | cut -d ':' -f 1
retrieves the local address used ...
1
When you say you installed it alongside windows do you mean that you are dual booting windows and mint? Or are you running a virtual instance within windows?
Either way try this from the command line:
ifconfig wlan0 up && iwlist wlan0 scan | egrep -i "ssid|cipher"
If you get some kind of error check to see if you even have a wlan0 config file in ...
Top 50 recent answers are included




