Ubuntu :: Route Internet Through Interfaces Running BackTrack 5?
May 26, 2011
I have an interesting problem for you all today. Lately, I've been learning a lot about computer security and I have a weird request. I would like to route the internet connection from a laptop running BackTrack 5 (Linux distrobution for security), to another Backtrack computer through an SSH session. I believe this is called SSH tunneling. Essentially I have these interfaces set up.
Code:
eth0
wifi0
I would like to route the internet I get from wifi0 and send it through eth0. Essentially this would make my laptop a sort of hub. The reason is, I have a wireless router I use for all my penetration testing computers and I don't like them on my network normally. I want it so that way I can use my main computer, which has no wifi card, to connect to this network. Also, this would be great experience for other things. I'm not completely set on having it done through an SSH session also. I think there is a way to do it with iptables but, I'm not entirely sure how.
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?
My only OS is Ubuntu 10.04. There are no partitions ( that is, I use the entire hard drive for Ubuntu, obviously). I need to run Backtrack for security testing. I've seen lots of various options from running it in virtualbox to running it from a bootable USB but there seem to be problems originating with the grub bootloader. One thing I keep seeing is that the only way to get round all this is to hard drive install Backtrack first and THEN install Ubuntu. Clearly I don't want to have to reinstall my entire world on my pc, play with settings, re-install a billion apps etc.
My question is this - Given that I have 10.04 installed and running alone, how do I get Backtrack installed/running easily and without all the associated disasters? I like the USB option because the thought of screwing the grub up does not appeal; I don't want to reboot my computer and be told "I'm grub and I don't want you to load anything" / Other Annoying Message.Backtrack's site says they didn't provide a USB option so what should I use to burn the ISO (does Unetbootin work for Ubuntu?
Iam working op my HP pavilion G60-DX .. I just installed VMware workstation and run Backtrack 3 ISO image as a linux virtual machine. loading the linux operating system up with "other linux 2.6.x kernell" as a setting, and starting the backtrack 3 virtual machine, everything is fine up to this point. when in the shell-konsole when typing at bt - # "airomn-ng" there is no: Interface Chipset Driver
I can access the internet and use browsers normaly from the backtrack it self , when its running .. how u can explain that to me .. VM cant se my wirless and tald me that there is no wireless interface while am already can open any website within ... what is the best solution to that! does the problem with my laptopb compatibility with backtrack !!! or with the VM itself
I'm running a 64bit Version of Windows 7. I'm also dual-booting 64bit Ubuntu 10.04 (if it matters). However, for this I'm trying to get this working on the Windows 7 side of things. I downloaded the BackTrack 5 32bit GNOME .iso file (BT5-GNOME-32.iso) to my USB stick fine and made a VM on VMware Player. I set the OS as "Other Linux 2.6.x kernel" (if it matters). However, when I go to play my VM I get the following screen. I know I'm supposed to type Startx to launch the GUI. However, nothing happens; it's completely unresponsive (and yes keyboard focus is routed to the VM). There is no response, the cursor doesn't even blink.
So you have to run wireshark as root too see the interfaces which I'm ok with but a message says that this is dangerous. I am just wondering WHY this is dangerous? I mean I know sudo gives complete read write access to the system but what I am wondering is why is that BAD for wireshark? What could potentially happen? Can someone expand on this?
I setup my old laptop for my mom with F13 and have sshd running. My dad set up their DD-WRT router so that it's forwarding port 22 to the laptop's ip address. Yet, I get "No route to host" when I try and ssh in from my house. Is there anything that would be preventing F13 from accepting the SSH connection?
I used ssh to log into my sever that I had and I from there I ran the command dhclient eth by mistake on the server but the serve had an static IP address. Unfortunately I can't ssh back into the server anymore! It replies back with No route not host. Now my questions are. First of all how do I change it back into the previous setting? Secondly, can I do this remotely since the server is in another place and I don't have access to it right now or do I have to go there and sit behind it and play around with it there?
For a very special project, many hardware issues, unusual limitations, etc, I'm turning my ubuntu into an access point (temporarily) by sharing the Internet from one device to another. I found out that with the devices I'm using, this can't be done with the network manager.
I need to get the internet from a device called 'tun0', to my 'wlan0', so it can broadcast it as a very special access point. I've read that there are ways to do this with the terminal.
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.
I have a 4.7 VPS web server on the net and it works very well. I am intending to upgrade it to Centos 5.x and have been having a play using VMWare Appliances and VMWare Player. I have therefore installed a local 4.7 applicance (all works well) and a 5.2 appliance (can't get basic internet connectivity).
I am running VMWare in Vista (apologies) and am connecting via a broadband modem (which effectively presents a serial modem to the computer via a USB interface). Using VMWare I am hooking this up to either the 4.7 appliance (works fine) or the 5.2 appliance (detects fine and connects but there is a problem). I think the issue with 5.2 is a firewall or a routing issue
I have prepared a report of the most common things people would need to know. The 5.2 appliance can see the USB device (lsusb), connects fine and obtains an IP and DNS addresses (wvdial) but ping fails. However the same on the 4.7 appliance works fine - I can use yum, ping and lynx etc. I have turned off the firewall on both appliances, but something is still getting in the way in 5.2!
*********************************** CENTOS 5.2 - ROUTING ISSUES? *********************************** * Have disabled the firewall using system-config-security-level > lsusb lsusb Bus 001 Device 007: ID 0fce:d0c5 Sony Ericsson Mobile Communications AB
My ISP has given me 3 IP addresses to use for the internet (76.148.200.3, 76.148.200.4 and 76.148.200.5).
If I do a "wget whatismyip.com" or netcat into another server, I am appearing as 76.148.200.3.How do I change my route (command line) in linux to route internet traffic through 76.148.200.5?
Code: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo code....
I have eth0 and tun0. tun0 is a VPN tunnel going over eth0. Everything on the other end is setup and working fine, when I type Code: traceroute 4.2.2.1 I see my the ping is going over 192.168.2.99 (eth0). When I then type Code: route add -net 4.2.2.1 netmask 255.255.255.255 dev tun0 traceroute 4.2.2.1 I see ping is going over 10.8.0.1 (tun0) instead of eth0, so that is working
What does not work however is when I do Code: route add -net 0.0.0.0 netmask 0.0.0.0 dev tun0 traceroute 4.2.2.1 I get no ping! I believe the problem is because all traffic is routing over tun0, which means even the VPN tun0 needs to go through eth0, it can no longer do this. Is there a way around this where I can route everything except for 114.77.31.26 (which is my VPN gateway for tun0)?
I currently have two internet interfaces installed, one is ethernet (eth0) and the second is wireless (wlan0). Many command line applications allow you to specify which interface should be used, but many gui apps don't provide this option or at least I haven't found it. I have some questions:
1. How would I tell Firefox to use only my wlan0 interface? If it's possible in Firefox, is this also possible with Google Chrome?
2. If a program doesn't provide a command line argument to support this, is there a standalone application that could help manage preferences for multiple applications?
I have a weird issue with source routing on a linux box.The plan goes like this:I have 2 internet providers at my office and i want to use a single router to route them both ( i don't need load balancing or failover). I just want access to either provider based on the ip i use on my pc. The first provider, let's call it RDS, is simple: i've got an RDS_IP, RDS_MASK and RDS_GW.The second provider is complicated, we'll call it INES. I have a INES_IP, INES_MASK, INES_GW and they also gave me a subnet of public ip's: ILAN_NET which i have to route myself through INES_IP.I also have a third nic with an local ip: LAN_NET and an alias for the INES subnet: ILAN_NETthe router has dhcp enabled, giving by default ip's from LAN_NET and using the default gw, RDSI have snat for the LAN_NET to go through RDS.
If i enter an ip from the ILAN_NET, instead of routing in through the INES_GW, it also goes through RDS_GW.the routing i've used for about 5 months has worked perfectly untill one day, when it just stopped. this is my setup:ip route add $RDS_MASK dev $RDS_IF src $RDS_IP table rdsip route add default via $RDS_GW table rdsip route add $INES_MASK dev $INES_IF src $INES_IP table inesip route add default via $INES_GW table inesip route add default via $RDS_GWip rule add from $RDS_IP table rdsip rule add from $INES_IP table inesip route add $LAN_NET dev $LAN_IF table rdsip route add 127.0.0.0/8 dev lo table rdsip route add $ILAN_NET dev $ILAN_IF table inesip route add 127.0.0.0/8 dev lo table ineswhat puzzles me the most is that this setup has worked, and now it doesn't .... without any changes on the router.I've tried everything save for a format/reinstall.
I have a weird issue that I have not seen on any forum. My jaunty on DELL studio laptop seems connected to net, but I can not access any network service (ssh, firefox etc.). But when I connect a cable the cable lights blink as it should be and in wireless connection my wifi light blinks.
It was working 2 days ago without problem, and I have not done big changes recently.I removed and reinstalled network-manager and network-manager-gnome. Nothing changed. I see a message in each restart as follows (when Openafs is starting). I can reproduce it with "/etc/init.d/openafs-client restart"
Code:
ADVISEADDR:error in specifying interfaces: no existing ip interfaces found
Today, I have an ADSL box which is my gateway to internet (192.168.0.1).
I have a Raspberry pi (RPI) which I use as a dhcp & dns server (192.168.0.2).
Recently my mobile phone operator installed a 4G antenna beside my home, and the bandwidth and latency are much better with my mobile phone than with my internet provider (ADSL).
I would like to install a wifi dongle on my RPI (I would get wlan0 & eth0 interfaces)
When RPI detect my shared phone connection (tethering) I would like RPI to automatically route internet:
- from authorized devices on my network to my mobile connexion (wlan0 -> mobile phone). - from other devices to the standard ADSL internet (eth0 -> ADSL box).
I don't want any device to use the shared 4G connexion, best would be authorized devices to be selected by MAC address. How I should properly setup such a network ?
My Ubuntu Box has 3 interfaces. eth0 (Internal 192.168.1.0/24)eth1 (External ISP DHCP)eth2 (External ISP Static IP)I need the outgoing traffic to internet for 1 of the internal pc (192.168.1.10) to only go only go through eth2
If I try to add a new interface (eth1) to /etc/network/interfaces, I get
Code: * Reconfiguring network interfaces... SIOCSIFADDR: No such device eth1: ERROR while getting interface flags: No such device SIOCSIFNETMASK: No such device
[Code]...
How do I add 2 interfaces and get anyone of them to work, as available ?
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.
I have 3 Interfaces for a different LAN's and when I start one interface the another interfaces goes down.How can it's possible?I configure my ethernets as:
I had some trouble with the netinst CD and I had to install lenny with the 6DVDs instead. My internet connection only works after I edit the interfaces and resolv.conf files manually. So my question is: can I do that from the netinst CD before it actually needs the connection to install everything? (otherwise I'll just need to use the DVDs.
Having trouble getting my Netgear WNA1000 working thru wireless router. Have tried lots of suggestions from other threads to no avail. Someone suggested that th routing table isn't set correctly, so have been trying to use the follwing to make the proper entry in the routing table: sudo route add -net 192.168.0.1 netmask 255.255.255.0 dev wlan0
Result: error message stating with: "route: netmask does not match route address"
followed by "Usage" instructions which tell me to do what I just did. Any ideas on how I can populate my routing table with correct entry for my wireless card? Not to complicate matters, but I temporarily turned off encryption on my router to eliminate that as a possibility until I get connected. So maybe it'still trying to connect via encrypted mode - do I need to turn off encryption on my (client) end?
I got this definition:"a process that replaces a series of related, specific routes in a route table with a more generic route." honestly I found it not so clear.. I want to know if this definition is correct and also more details about this subject..
my computer ran on windows now is duel boot runs fine with vista internet wise (wireless) but ubuntu is very slow just like a lo of people are saying but just now i thought i will hook it up wired to modem and it is not any faster at all very confused and dont know where to go or what to do