Ubuntu Servers :: HOW TO Be In Two Places At Once A.k.a Ipredator Independent Of The Default Route
May 4, 2010
I have a home server running Lucid which basically runs our home lan, but I also wanted to be able to run transmission-daemon over an ipredator VPN connection completely independently of the ethernet port (as far as the application layer is concerned anyway). Most of the howtos for setting up VPN use the VPN as the default route, however I still wanted to run a webserver, dnsmasq etc, not to mention free bandwidth access to my ISP etc.
Thus, this howto. The ppp connection still tunnels through eth0, but as far everthing else is concerned my server has two independent network ports eth0 and ppp0 and applications use the default route via eth0 to our router unless explicitely directed down pppX. I assume that you already have transmission-daemon installed.
[Code].....
View 9 Replies
ADVERTISEMENT
Jun 25, 2010
i have setup an open vpn server and when i connect to it the client pulls an IP and but not default gateway. My goal is to route all web traffic through the VPN... My config file looks like this...
Code:
dev tun
proto tcp
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
[code].....
View 2 Replies
View Related
Jun 17, 2010
My server keeps displaying a message: "The computer needs to restart to finish installing updates. Please save your work before continuing" every time I log on. Last night I did four consecutive reboots but the message is still there. I log i remote with NX / Gnome. Synpatic shows "0 to install/update 0 to remove".Is this normal? Does every single update need an independent reboot, so there is a queue to catch up with? Or is there some reboot flag that is not resetting properly after reboot?
View 9 Replies
View Related
Feb 1, 2010
I'm trying to move away from using /etc/rc.local for adding routes I've added
IPADDRESS0=xxx.xxx.xxx.xxx
NETMASK0=xxx.xxx.xxx.xxx
GATEWAY0=xxx.xxx.xxx.xxx
to /etc/sysconfig/network/network-scripts/route-eth0 after doing 'service network restart' I'm do see the new route as described by directive above. However, I still do not see the default gateway that's supposed to be on my box. Where/how do I define the default gateway using the route-ethX method above?
View 1 Replies
View Related
Mar 22, 2011
I'm currently working with Ubuntu 10.10.I wanted to add a default route to a gateway named ppp0.I did it with the command> route add default ppp0It works ok. But then from time to time it suddenly stops and I have to go back again to the server and retype the command. I'm clueless as to why is it happening. I can assure no one is working at the server or doing anything over there.Does anyone know causes that might be triggering route default to stop working?Btw where is the best place to add this command so it will be executed automatically on start-up and without needing to login to the server?
View 5 Replies
View Related
May 1, 2011
I opened a folder with brasero a while ago, to make a DVD. For some reason this stuck. When I click on any of the bookmarks in places, Brasero pops up. It also happens if I click "open containing folder" in Ktorrent, so it must be a global setting, but I couldn't figure out where to change this back to Nautilus
View 4 Replies
View Related
Dec 5, 2009
I've been seeing a bunch of issues with the /etc/resolv.conf not picking up the nameservers for 3g connections, and managed to fix that issue using tips found here.. the one thing I m having a problwm with is my 3G USB modem not picking up a default route/gateway. I can connect using KNetworkManager, get an IP and nameservers, but.
[Code]..
And to top it all off, I cannot figure out what the default gateway should be from verizon to just write a script out myself that'll do it automatically.
View 4 Replies
View Related
May 11, 2009
I would like, from a C program, find the hardware MAC address of the default route path. With BASH I can do a 'route' find 'default and then an ifconfig and grep for 'HWaddr'. Are there C calls to do the same??
View 12 Replies
View Related
Feb 28, 2010
In an attempt to get something that, well, you know, just works... I migrated a laptop to Karmic server today. Which works fine, except for one thing: when I use wvdial and a Huawei E160g USB modem to connect to the Internet (which is the only option out here in the sticks where I live) no default gateway is set. When I add one manually everything is fine, except that the default gateway keeps disappearing after a while (at irregular intervals, as far as I can see). Nothing appears in any logfile that even mentions the default route, let alone a reason for its magical vanishing trick. My wvdial.conf is fairly pedestrian:
[Code]...
What's going on here? I'm stumped. And the mighty Googlebrain doesn't seem to know, either. How do I get wvdial & friends to set the correct default route upon connecting? Given the fact that without a default route a PPP connection to a remote network is little use, I would expect this to be a standard feature and not something that I'd have to script a work-around for myself. But then, I have been wrong before. Secondly, and more importantly, why does my default route keep disappearing without a trace?
View 4 Replies
View Related
May 24, 2010
I ask your help to diagnose a problem. For business reasons I use a broadband internet connection via a mobile phone's connected via bluetooth [rfcomm]. Speed is not the maximum but it is more than sufficient for my work. For configuration of ppp I followed this guide Pon pulls up dialup, but I can't navigate also if resolv.conf and default route are correct. In addition I would like to use the NetworkManager that by default, does not see the device. I worked around the problem this way:
I modified the / etc / rc.local so that launch at boot time: # Rfcomm bind yes
After starting Lucid Lynx, bluetooth connects to the phone but NetworkManager does not see the modem.
When I run the connection manually, by: # Pon BluetoothDialup
NetworkManager sees the device, but can not use it because obviously it is locked by the ppp daemon.
So I close the connection with: # poff
Now NetworkManager sees the broadband modem via / dev/rfcomm0, dialup is performed properly. I can finally surf and just enable vpn with NetworkManager. all start automatically at boot, without the need to manually connect and disconnects the dialup to use, finally, the NetworkManager.
View 1 Replies
View Related
Jul 6, 2009
I have the following network/server configuration:
[Code]....
How do I prevent eth1 from being able to overwrite the default gateway that eth0 has already set?!? I read that one can create route-* files in the /etc/sysconfig/network-scripts/ directory to setup static default routes.But those seems to require one to know the IP address of the gateway, but in my case the ISP's gateway is served via DHCP and so it could vary from day to day. Here are the contents of some of the relevant files:
[code]...
View 2 Replies
View Related
Jan 14, 2010
I have a static ip on my wired (eth0) connection. I thought I had it well set up in yast. In the routing section I do have my default gw coming up there, with the the right nw i/f (eth0) associate with it. However, when I boot up, y config seems to ignore that fact, and I have to keep goign to root and typing "route add default gw <mygwip>" each time, which is something I want to avoid. Isn't it odd that the route settings created by yast have no effect? If they did, the route would be set up on bootup and I would haven't to do that typing.
View 2 Replies
View Related
Jul 11, 2010
I'm currently struggling with the following problem: Connecting to a wired network with NetworkManager (0.7.1) is no problem at all: Everything is set up automatically, including the default route:
[Code]....
When I now add the route manually it works. But as soon as the cable is plugged in, the NetworkManager overwrites the routing table entry again (which makes it quite annoying). Does anyone know a way to avoid this behaviour?
View 6 Replies
View Related
Aug 21, 2010
I am attempting to run apache on my linux router while connected to a VPN. My default route is set to the VPN endpoint and I cannot control port forwarding at that end. I cannot seem to connect to any service that i bind to the eth0 interface. I believe that my iptables rules and OpenVPN are the source of the problem.
/sbin/iptables -t nat -A POSTROUTING -o tun1 -j MASQUERADE
/sbin/iptables -A FORWARD -i tun1 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o tun1 -j ACCEPT
View 5 Replies
View Related
Jan 12, 2011
I'm trying to set up load balancing using iproute2 following this guide. I've got 4 dsl links as follows:
eth1 - 100.100.100.1
eth2 - 100.100.100.2
eth3 - 100.100.100.3
eth0 - 111.111.111.111 (main uncapped line)
eth0 is the default route, and eth3 is being used for something else. So what I want to do is load balance browsing between eth1 and eth2. I've added all of the routes in the LARTC guide, but the command to enable the load balancing:
Quote:
ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop via $P2 dev $IF2 weight 1 obviously involves creating a new default route. Since I'll be using Squid to push the traffic through the relevant line, how can I set up a load-balanced link for eth1 and eth2 without changing the existing default route on the server?
View 1 Replies
View Related
May 5, 2010
I have been encountering this problem, not only on 10.4, but on older versions too: I use a wifi router to connect my laptop to the Internet, but sometimes I need to connect directly to another computer to move some files over GLAN. But Ubuntu's Network manager doesn't allow me to configure the eth0 interface without specifying a gateway (no gateway = grey submit button), but when a gateway is specified, it always rewrites the default gw specified already by the active wifi connection and returns back after unplugging the eth cable.
Of course this can be solved by a few route commands, but this is unacceptable since it is needed to establish the cable connection without any further assistance from within and as well without replacing the default gw and thus breaking the Internet connection. Is there, please, any possibility how to prevent Network Manager from replacing these routes?
View 2 Replies
View Related
Mar 26, 2009
So I have two network Interfaces
eth0 - NAT behind a router
eth1 - Public IP
When ever I restart the machine, both interfaces pull a IP, but the it randomly chooses eth0 or eth1 to have the gateway. I want the gateway to be eth0 always.
[Code]...
Is there some file or setting I can modify in Fedora10 that will always choose 192.168.1.1 on eth0 as the default gateway?
View 2 Replies
View Related
Aug 18, 2010
In 11.3, if in "/etc/sysconfig/network/ifcfg-eth0" i set DHCLIENT_SET_DEFAULT_ROUTE="no" this seems to have no effect. If i start my box, the routing table has the "default route"-entry offered by a remote DHCP-Server. More Info: My Susebox has eth0 and eth1 and both network devices should use DHCP4. But from DHCP-offer on eth0 i want to use
* "offered IP-Adress for eth0"
* "offered NTP-Server"
* "offered Host-Name"
From DHCP-offer on the eth1 i want to use
* "offered IP-Adress for eth1"
* "offered DNS-Servers"
* "offered Default Route"
View 1 Replies
View Related
Nov 15, 2009
yesterday I installed openSUSE 11.2 on my laptop. But I'm having problem getting the wifi configured properly. During the installation I got the message "No network running" (which I also saw after the installation when using the network configuration module of YaST after switching from ifup to NetworkManager). After installation NetworkManager seemed to work fine, it detected my wifi card, found the network, and I could even connect to it. Then the problems began, no Internet connection. The first thing I tried was pinging Google which yielded an "unknown host" message. So I checked /etc/resolv.conf, to look for the DNS servers, which where missing.
I added them manually and tried again. Still no luck, so I started pinging my router, which worked, tried again pinging Google using one of there IP addresses, which failed. So I ran route to find out which routes where being used, this one gave an unexpected result, because it only showed the route to the local network (I'm not sure about the loopback one, because this was also a lot of times missing when testing):
[Code]...
View 9 Replies
View Related
Jun 30, 2010
use Ipredator on Ubuntu 10.04? how to set up Ipredator on Ubuntu
View 2 Replies
View Related
Apr 10, 2010
I recently signed up for the IPREDator service, and one limitation I've found is that having 2 computers I cannot have both of them connected at the same time. So, I decided to have 1 of them connected (my 'server'), and have the other route all of its traffic over the 'servers' VPN.
My server connects to the IPREDator VPN on interface ppp0.
My server will allocate ppp1 for the VPN from my client.
My server's LAN address is 192.168.1.1.
My client's LAN address is 192.168.1.2.
On the server perform the following...
Code:
sudo apt-get install pptpd
Modify /etc/pptpd.conf to have the following options:
Code:
option /etc/ppp/pptpd-options
logwtmp
localip 192.168.1.1
remoteip 192.168.1.100
[code]....
We need to restart the PPTPD and Networking on the server (I would just restart the server). Make sure you connect to the IPREDator VPN on the server first (otherwise ppp0 won't be assigned to it).Click Network Manager, VPN Connections click on your new VPN.
You should be prompted for your password (default in this guide is just 'password'). You should now be connected via PPTP to your server, which is in turn connected to the IPREDator VPN, and all of your traffic should be tunnelled as such.I've probably made a ton of mistakes in this guide, and there's no doubt a hundred different ways to make this more elegant.
View 2 Replies
View Related
Sep 17, 2010
There are two connections in my Ubuntu server: eth0 is a normal interface and, eth1 is configured with an static IP, and has an domain name with that IP. But this connection is charged by bytes, very expensive.
how to set up the route table so that: everyone can access my server with the domain name, and let the traffic goes from eth0 as much as possible(I have a proxy service on my server. At least, let the proxy traffic goes from eth0)?
[Code]...
View 7 Replies
View Related
Nov 9, 2010
For the last couple of days I've been building on a server built from an old (well, not too old) computer. My goal is to use it for multiple purposes like a webserver, home automation, and possibly a future media center (if I get my TV card to work). But perhaps the main reason is to get wireless access to the internet for my laptop, and to connect it to my other (stationary) computer. When I'm done I'm also planning on writing a guide for setting up an access point with the rt61 chipset, as there seems to be many people looking for this. First I just need to get through this problem though .
For this I use two wired NICs, eth0 for the local interface to my computer, and eth1 as an external interface for the internet. Moreover I use a wireless NIC (DWL-G510 using the rt61pci driver) in conjunction with the daemon hostapd to provide a wireless interface for portable computers to connect to. eth1 gets its IP through DHCP from my ISP, while eth0 and wlan0 have static IPs on two different subnets like this (copied from /etc/network/interfaces):
Code:
auto eth0
iface eth0 inet static
[code]....
View 4 Replies
View Related
Nov 13, 2010
I have a server set up with a VPN (openVPN with DynDNS). My emails are located there and I can check them from home, office, where ever really, with different computers, no problem.However, due to restrictions of some ISPs I would have to change the SMTP server used, depending on where I am with my laptop.
Now, I thought about using the VPN to also tunnel the SMTP traffic through that. But how am I doing that?So far, when I'm connected to via VPN I simply have a local (from the server point of view) IP address to connect to my IMAP server. But how can I route the SMTP port 25 through the VPN?Is that possible to do, also in a way that I don't have to change anything depending on where I am, as in within the network of the server or outside? Since when I'm within the network the VPN obviously isn't connecting..
View 7 Replies
View Related
Feb 4, 2011
I installed Ubuntu Server 10.10 today on an old laptop. I then used webmin to configure it and enabled windows networking, the laptop is in the same workgroup as another win7 laptop and a win xp desktop. However, I can't see the server in My network places.
View 9 Replies
View Related
Apr 24, 2010
I do not understand this command well. Yes, I have looked at man route and that whilst that gives lots of information about the switches I cannot see it in context. I have a server with two nics. One to the Internet (eth1) and one to the lan (eth0). I use pppoe and when it is running I get a virtual adapter appear in ifconfic called ppp0 which shows the public DNS and ISP session IP. I entered the command:
route add -host (gateway IP) dev eth1
and get the Internet to appear on the server. However, I do not get the Internet to the clients. I have turned off the firewall to be sure that this is not the problem.
View 8 Replies
View Related
Mar 22, 2011
I am running Ubuntu Server 10.10. I have installed OpenVPN using this guide I have set up everything correctly as this guide says, but I am having problems with the config file. I want to securely route all traffic on the client to the server, how ever the server will not start. My config is below:
Quote:
#################################################
# Sample OpenVPN 2.0 config file for #
# multi-client server. #
# #
# This file is for the server side #
[Code]......
The servers ip is 10.0.0.65 and I want to assign the clients the ip range of 10.0.0.200 to 10.0.0.20 When I try to start the server I get the message Fail.
View 8 Replies
View Related
Sep 1, 2009
Background: Took a while to get this working correctly, so figured I'd save you all some time... I (finally) received the beta invite from iPredator. I wasn't happy with the NetworkManager-pptp implementation, I'm running the stock kernel, I stopped the NetworkManager service at this point.
Goals:
1. To be able to control the PPTP tunnel from a remote location over ssh
2. To have services I run from my box accessible via my public IP on the internet (sshd, httpd etc) whilst the tunnel is up
3. To route all Torrent traffic from Vuze out of the encrypted PPTP tunnel, and have it return over that interface
4. To route all other traffic, by default, to my ISP unencrypted
5. To block all Vuze traffic if the tunnel is down
Method:1. PPP config
First, I entered my login details (altered in the below output, of course!!) into chap-secrets and then used "chmod 600 chap-secrets" to make it read/write for root only:
Next, I created a peer file (644 permissions) for the VPN connection, the file name has to match the "iPred" I used above:
I stuck with the defaults in /etc/ppp/options.pptp
To initiate the tunnel, I use: pppd call iPred mtu 1435 mru 1435 persist nolog
Regarding the options used... I'll get onto the MTU/MRU later, persist has the tunnel attempt to reconnect 10 times if it drops, nolog reduces the high volume of syslog messages. The logs for the connection process are written to /var/log/messages, interface ppp0 was created and routing entries were set up (internal network stuff has been cut out below; we'll call 192.168.100.104 my WAN IP, though I've got a static internet-routable IP and wanted to mask it here). The (dynamic) endpoint of the tunnel is 93.182.164.2: you need two routes to this, one via eth0 (my WAN interface) for internet routing of the encrypted packets, and one through the tunnel itself to tunnel and encrypt the traffic:
References:[url] [url]
2. Firewall Setup
I'm a "belt-and-braces" kinda guy ("belt-and-suspenders" if you're from the US), and I've got a custom firewall setup. As I've brought a new interface into the equation, I needed to add some rules.
In order, the rules:
A. NAT the outgoing packets to the ppp0 interface IP
B. Allow established sessions back in
C. Allow the default ports for Vuze through, even if unsolicited, on port 63255 (TCP and UDP)
D. Drop traffic that originates from Vuze (identified by the IP of interface lo:0, which we'll see later) if it tries to exit via eth0 (useful if the tunnel drops or hasn't yet been started)
You can view the rules in place by issuing: iptables -nL
References:man iptables [url]
3. Routing Setup
Obviously, I didn't know who the Vuze peers are going to be and setting a default route via ppp0 means that all traffic would be encrypted. Instead, I created a new, distinct, routing table called IPRED in iproute.
Then I added a default route, via ppp0, into the IPRED routing table and checked that it was there:
The main (default) routing table is still there and has it's routes:
4. Traffic Identification
I tried setting the DSCP (ToS) in Vuze, but that didn't make it into the packets (checking the output packets with Wireshark). So, I created a new Loopback interface lo:0 on my box (later I entered this line into /etc/rc.local so it'll survive a reboot):
I then added a rule to pass traffic from this new lo:0 IP to the IPRED table:
There are a number of other ways to pick out traffic with "ip rule", but this seemed the most elegant solution in this situation.
5. Vuze Config
I looked down the list for the local IP addresses, then bound Vuze to the lo:0 interface which, in Vuze, is lo[1]
Whilst in here, I also dropped the Line MTU to 1435. You'll notice that this matches the MTU and MRU set when using pppd to establish the tunnel... I'm on DSL and have the MTU set to 1478 for the DSL link, the difference between the 1478 and 1435 is the overhead of the additional headers used with PPTP tunnelling (both PPP and GRE headers encapsulate the packets). With the MTUs set up in this way, I shouldn't get any fragmentation of packets on the link, packets with the DontFragment bit set shouldn't get dropped. I gave Vuze a restart.
6. Verifying Operation
I closed any apps that were using the internet, fired up Vuze, loaded a torrent, then opened two Wireshark windows.... Started Wireshark#1 on the eth0 WAN interface and Wireshark#2 on the ppp0 tunnel interface. I saw a long list of PPP and GRE packets (in white) scrolling on the eth0 window, showing that Vuze is going through the tunnel. Checking the ppp0 Wireshark window, I saw the actual Vuze traffic on the ppp0, with SYN's, ACK's, http packets etc as it's being sent down/back through the tunnel.
Starting firefox and visiting www.whatismyip.com, the IP reported was my eth0 address, I saw the http traffic on Wireshark on eth0. Starting e-mail, I saw the packets on eth0.
Dropping the tunnel, I checked Vuze, saw that torrents had stopped and confirmed that I couldn't connect to the net with it.
7. DNATing
Reconnecting everything, I sat and watched the Wireshark outputs on ppp0 and eth0 for a while to make sure everything was working. I noticed that the ppp0 interface was creating a lot of ARP requests for external IP's and sending them out, unencrypted, through eth0 - BAD news!! I'd forgotten that I would need to Destination NAT the unsolicited inbound connections... D'Oh!
As the unsolicited inbound connections are directed at the internet-routable tunnel IP of ppp0, we need to point these to the lo:0 interface that Vuze is listening on. Replies to these will be NAT'd back to the ppp0 address by the MASQUERADE rule we've already entered in iptables and, since the source IP will 172.27.72.64, the packets will match the ip rule pointing them to the IPRED routing table, thus they won't generate ARP requests.
Retrying everything with the firewall updated, everything is working 100% :-D
8. Misc
As the iptables rules have been saved, and lo:0 will survive a reboot in /etc/rc.local, the only commands that need to be run each time you want to bring up the tunnel are (easily scripted with a sleep statement of about 10 seconds after pppd call...):
And, if you wanted to just send all traffic over ppp0, this would be:
Conclusion: I love Linux, an intellectual challenge, having complete control over my PC; iPredator rocks and I hope this howto is of use to anyone running Fedora and iPredator :-D
View 4 Replies
View Related
Mar 24, 2011
I did set samba server up. I just modified only one configuration from default /etc/samba/smb.conf file.
Just workgroup = MSHOME to workgroup = WORKGROUP.
And browseable = yes.
Beacuse my xp workgroup is WORKGROUP. So I changed as same workgroup name
both unbuntu and XP.
But I couldn't find samba pc on network places at XP. I have started smbd and nmbd already. There is a ridiculous something. I can access samba at XP only typing \samba IP address. But why I can't see at network places. I am using ubuntu 10.04 TL.
View 1 Replies
View Related
May 8, 2011
I have 3 network interfaces on my Linux Router :
Interface - Gateway - Type
Code:
br0 - 192.168.0.1 - Internet
eth2 - 192.168.1.1 - LAN
tun0 - 10.0.0.2 - VPN (via br0)
What I'd like to do is to route all TCP packets coming from eth2 to tun0 where a VPN client is running on 10.0.0.2. If I delete all default routes and if I add a new route to tun0 like :
Code:
route del default
route add default gw 10.0.0.2
Everything is fine, and everyone on eth2 can reach the Internet using the VPN access. Now the problem is that my VPN client does not allow any other protocols other than TCP. And I also want to allow VPN access only to eth2, no other LAN nor the router itself. use iptables to filter any TCP packets and mark them, so they can be sent to tun0, while any other packets can reach the Internet via br0 (192.168.0.1). I found on the Internet that we can mark packets before they get routed. Using the following commands :
Code:
iptables -t mangle -A PREROUTING -j MARK --set-mark 85 -i eth2 -p tcp --dport 80
ip route add table 300 default via 10.0.0.2 dev tun0
ip rule add fwmark 0x55 table 300
First of all, --dport 80 never work... :/ I wanted to filter TCP 80 packets coming from eth2, but none of them seems to be HTTP packets... oO (very strange...). Nevermind, I decided to forget about the --dport option. I use the "iptables -L -v -t mangle" command to see how many packets are marked, and it is working fine, all TCP packets coming from eth2 are marked. Now the problem is that none of them are routed to tun0 they are all respecting the "route -n" rules... and not the "table 300" rule I have created.
View 4 Replies
View Related