Link to home
Start Free TrialLog in
Avatar of Handersson75
Handersson75

asked on

Linux mapping nätverk ports

Dear expert

I wonder if this is possible to do and if its possible I need to know the tutorial of it, thx.

Im currently setting up and Debian linux system and planning using it as a firewall/VPN server. I only have one problem, the computer is a old laptop and it only got one network card.

Here is what I thought, to plug the laptop with a hub/switch and use those hub/switch to plug into internet/lan cable and mapping those ports from switch to firewall/VPN settings, is it possible to do? So for exemple: Hub/switch port2 is outside, port3-4 is inside. and also apply the rules to those?

Thx.
Avatar of Handersson75
Handersson75

ASKER

Just a thought, if its not possible, then its might to possible to doing it in VMware to create virtual network cards and mapp those to hub?
You should be able to set up a secondary IP address on that 1 NIC by editing your network interface:

auto lo
iface lo inet loopback

auto eth0 eth0:0
iface eth0 inet static
    address 10.1.1.2
    network 10.1.1.0
    netmask 255.255.255.0
    broadcast 10.1.1.255
    gateway 10.1.1.1
    up route add default gw 10.1.1.1
    down route del default gw 10.1.1.1

#Second IP same NIC

iface eth0:0 inet static
    address 192.168.1.2
    network 192.168.1.0
    netmask 255.255.255.0

Open in new window



...you can then map traffic and gateways according to your plan.
thx for answering

what happens if I want to add more interface to the laptop? like wireless APs and clients? I still need a hub/switch tho.
You should be able to add a wireless adapter if that's what you meant, you would need to add drivers for it.

You can add at least 2 virtual interfaces on that LAN port on your laptop, that are readily available to be use by your switch/hub.

And yes you will need a switch/hub for your clients.
thx for the answer again, is there any tutorial of how to do it, to map the network ports from hub/switch to debian console?
Depending on your level of Linux knowledge, this might be tricky:

Here is a link to set up OpenVPN on Debian Linux.


http://wiki.debian.org/OpenVPN
beginner level, I want to map the port from switch/hub to laptop, is there any tutorial for that?
ASKER CERTIFIED SOLUTION
Avatar of Phiwi Moyo
Phiwi Moyo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thx