The Official *nix Thread

Inane baanter or words of wisdom - you decide...
Post Reply
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

xav wrote: Edit: Beaten to it with the same answer that was in the link I provided... :roll:
Sorry, I got that too - I was just responding to replies here :?
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

We've got several static IPs for external access at work. Unfortunately, we've used 'em all now. I hit on the idea of using one of the machines with an external IP address to route traffic that hits a non-standard port to one of the machines with a DHCP assigned address. What would I use for this? iptables?
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

Yup - it's NAT (network address translation) and PAT (port address translation), the latter being used if the [external] port you're hitting is different to the internal one.

IPtables refers to it as "masquerading", if you google. Someone helped me out on here (in the programming thread) with a ruleset to do just that.

BTW - most routers do this, including my home Netqueer one. Several ports are routed through to my server, a range through to my tower for IRC DCC and some others routed through to my laptop for similar purpose. IPtables can do it quite happily.
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Cheers Dave :)
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
defsdoor
Baaaaaa!
Baaaaaa!
Posts: 3909
Joined: Fri Jan 30, 2004 12:26 am 0
Location: Sunny Beduff

Re: The Official *nix Thread

Post by defsdoor »

If you are forwarding to a DHCP assigned address you will need to make it a fixed assigned address.
User avatar
defsdoor
Baaaaaa!
Baaaaaa!
Posts: 3909
Joined: Fri Jan 30, 2004 12:26 am 0
Location: Sunny Beduff

Re: The Official *nix Thread

Post by defsdoor »

Also, if this is for external to internal access - install openvpn.
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

defsdoor wrote:If you are forwarding to a DHCP assigned address you will need to make it a fixed assigned address.
I've configured our router to always hand out a specific DHCP address to this machine based on the MAC address, so this is not an issue :)
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

RageMatrix wrote:I've configured our router to always hand out a specific DHCP address to this machine based on the MAC address, so this is not an issue :)
Good practise - not everyone does it.

However, sure some Dynamic DNS daemon can also be frigged to add/remove a MASQ rule upon demand, so even that constraint becomes moot. I find having statically-assigned IPs mapped to specific MACs in the lease table helps when debugging.
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Phew - managed to upgrade one of our servers from an ancient Fedora 6 to Fedora 10 without losing any data on any partitions only to find that the nagios server that is running on there now failed to work on any Perl plugins aside from ping with a rather unhelpful "error 127". Finally figured out after su'ing to the nagios user and trying to run check_nrpe directly that the /lib/libssl.so.* library is out of date for this version so a quick "ln -s /lib/libssl.so.6 /lib/libssl.so.7" fixed it. Staggered home at 8pm :D
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

RageMatrix wrote:Staggered home at 8pm :D
SSH from outside, lad. Can do it all from the comfort of your home, then.

(apart from testing FW rulesets, but there's workarounds for that...)
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Dungeon-Dave wrote:
RageMatrix wrote:Staggered home at 8pm :D
SSH from outside, lad. Can do it all from the comfort of your home, then.

(apart from testing FW rulesets, but there's workarounds for that...)
I was already at work anyway :D Besides, I only live about ten minute's walk away from our office (which is nice).
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
JQW
Baaaaa!
Baaaaa!
Posts: 1186
Joined: Thu Feb 22, 2007 12:23 pm 0
Location: Ripon, where nothing ever happens.

Re: The Official *nix Thread

Post by JQW »

RageMatrix wrote:Phew - managed to upgrade one of our servers from an ancient Fedora 6 to Fedora 10 without losing any data on any partitions only to find that the nagios server that is running on there now failed to work on any Perl plugins aside from ping with a rather unhelpful "error 127". Finally figured out after su'ing to the nagios user and trying to run check_nrpe directly that the /lib/libssl.so.* library is out of date for this version so a quick "ln -s /lib/libssl.so.6 /lib/libssl.so.7" fixed it. Staggered home at 8pm :D
Creating such a symlink may appear to work in this instance; however it could lead to problems due to subtle differences between the two versions. The best option is ensure that both versions of the library are installed simultaneously.
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

JQW wrote: Creating such a symlink may appear to work in this instance; however it could lead to problems due to subtle differences between the two versions. The best option is ensure that both versions of the library are installed simultaneously.
I'm a little unclear about how to install new versions of these lib*.so.* libraries. .so == shared objects? How can I find out which .rpm package such libraries belong to? In this instance, it works fine. It appears the libssl.so.7 is itself a symbolic link to libssl.so.0.9.8g anyhow.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
BassHead
Baaaaa!
Baaaaa!
Posts: 1022
Joined: Fri Apr 26, 2002 10:58 pm 0
Location: Leicestershire, UK

Re: The Official *nix Thread

Post by BassHead »

JQW wrote:How can I find out which .rpm package such libraries belong to?
yum provides "*/libssl.so"

will give you what want, or you could include the full path.
b(H)

----
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

BassHead wrote:
JQW wrote:How can I find out which .rpm package such libraries belong to?
yum provides "*/libssl.so"

will give you what want, or you could include the full path.
Excellent, thanks :)
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
Post Reply